-
Notifications
You must be signed in to change notification settings - Fork 1
Reflection
29thnight edited this page Nov 28, 2025
·
1 revision
간단 설명: 리플렉션 매크로/유틸/타입/레지스트리/GUI/직렬화/벡터 지원 등 리플렉션 시스템 구성 헤더들.
-
Reflection.hpp: 매크로 헤더 포함 -
ReflectionMecro.h: 클래스/상속/스크립트 리플렉션 매크로 정의, 생성 본문 매크로 -
ReflectionType.h:Type/Property/Method구조와 벡터 이터레이터, 컨셉 정의 -
ReflectionFunction.h: 타입 등록/검색, 프로퍼티/메서드 생성, 메서드 호출, Undo 커맨드 생성 -
ReflectionRegister.h: 타입/열거/팩토리/캐스터/Undo 매니저 레지스트리와 스코프 관리, 초기화/정리 -
ReflectionImGuiHelper.h: ImGui 기반 프로퍼티/메서드 편집 GUI, 드래그드롭, 다양한 타입 위젯 처리 -
ReflectionYml.h: YAML 직렬화/역직렬화/프리팹 패치 로직 -
ReflectionVectorFactory.h:std::vector<T>동적 생성 레지스트리 -
ReflectionVectorInvoker.h: YAML 노드→벡터 역직렬화 핸들러 레지스트리 -
ReflectionVectorMapper.h: 템플릿 매퍼로 벡터 요소 역직렬화 구현
실사용 파일 SoundComponent.h의 커스텀 속성/메서드 문법과 자동생성 파일 SoundComponent.generated.h를 통해 리플렉션을 구성합니다.
- 사용자 헤더 정의 예 (
SoundComponent.h발췌)
- 클래스 상단에 자동생성 헤더 포함:
#include "SoundComponent.generated.h" - 클래스 내부에 자동생성 매크로 배치:
ReflectSoundComponent - 직렬화 속성:
[[Serializable(Inheritance:Component)]], 본문:GENERATED_BODY(SoundComponent) - 리플렉션 대상 필드에
[[Property]]부여, 메서드에[[Method]]부여- 예)
[[Property]] std::string clipKey;,[[Property]] ChannelType bus;,[[Property]] float volume/pitch;,[[Property]] bool loop/playOnStart/spatial/useReverbSend; - 예)
[[Method]] void Play();,[[Method]] void Stop();,[[Method]] void Pause(bool);,[[Method]] bool IsPlaying();,[[Method]] void PlayOneShot();
- 예)
- 헤더툴 자동생성 예 (
SoundComponent.generated.h)
- 매크로
ReflectSoundComponent가ReflectionFieldInheritance(SoundComponent, Component)로Reflect()를 구현하고,PropertyField/MethodField에 지정된 항목을 나열합니다. - 생성 결과는 필요에 따라
PropertyOnlyInheritance또는PropertyAndMethodInheritance형태로 부모Component를 이어받습니다.
생성 매크로 구조(예시):
ReflectionFieldInheritance(SoundComponent, Component)PropertyField({ meta_property(clipKey) ... })MethodField({ meta_method(Play), meta_method(Stop), ... })FieldEnd(SoundComponent, PropertyAndMethodInheritance)
- 런타임 등록/사용
- 초기화에서
Meta::Register<T>()또는AUTO_REGISTER_CLASS(T)사용 - GUI/직렬화 사용:
- GUI:
Meta::DrawObject(instance, T::Reflect())로 ImGui 인스펙터 생성(슬라이더/체크박스/텍스트 등 자동 매핑) - YAML:
Meta::Serialize(instance)/Meta::Deserialize(instance, node)로 저장/로드
- GUI:
- 포인터/벡터/열거 처리
- 포인터 필드는 타입명 기반으로 중첩
DrawObject/Serialize처리 - 벡터 필드는
VectorFactory/Invoker로 요소 생성 및 역직렬화 - 열거형은
AUTO_REGISTER_ENUM(EnumType)등록 후 콤보 UI/직렬화 지원
위와 같이 [[Property]]/[[Method]]가 붙은 항목은 자동으로 리플렉션 시스템에 연결되어 에디터/직렬화/스크립트 상호작용에 활용됩니다.
API Reference
Main
PhysicsSystem
RenderEngine
- Animation
- AnimationJob_Internal
- AnimatorData
- BillboardModuleGPU
- BillboardType
- Camera
- CullingManager
- DeviceState
- DeviceState_Deferred_Unsafe
- Foliage
- LightMapping
- MeshRendererProxy
- PipelineStateObject
- PrimitiveRenderProxy
- Projection_RenderPipelinePass
- ProxyCommand
- RenderGraphBuilder
- RenderModules
- RenderPassData
- RenderScene
- RenderScene_ComponentFlows
- Terrain_Foliage_LightMapping
- TerrainBuffers
ScriptBinder
- ActionMap
- AIManager
- AnchorPreset
- AniBehavior
- AnimationBehviourFatory
- AnimationController
- AnimationState
- Animator
- AniTransition
- ArticulationData
- ArticulationLoader
- AvatarMask
- BehaviorTreeComponent
- BillboardType
- BlackBoard
- BlackBoardType
- BlackBoardValue
- BoneMask
- BoxColliderComponent
- BTBuildGraph
- BTBuildNode
- BTEnum
- BTHeader
- CameraComponent
- Canvas
- CapsuleColliderComponent
- CharacterControllerComponent
- Component
- Component_Binding
- ComponentFactory
- ConditionParameter
- CSharpScriptComponent
- CurvePoint
- DecalComponent
- EBodyType
- EffectComponent
- EForceMode
- FoliageComponent
- FoliageInstance
- FoliageType
- FormIntPtr
- FSMState
- FunctionRegistry
- GameObject
- GameObject_Binding
- GameObjectType
- HotLoadSystem
- IAIComponent
- ImageComponent
- InputAction
- InputActionManager
- InputManager
- InvalidScriptComponent
- IObject
- IProjectSetting
- IRegistableEvent
- IRenderable
- IScriptedFSM
- ISerializable
- KeyArray
- KeyBitFlag
- KeyState
- LightComponent
- LightMapping
- LightProperty
- LinkData
- MeshColliderComponent
- MeshRenderer
- ModuleBehavior
- MonoBehaviorRecord
- MonoManager
- MSBuildHelper
- Navigation
- NodeFactory
- Object
- Object_Binding
- PhysicsManager
- PlayerInputComponent
- Prefab
- PrefabEditor
- PrefabUtility
- RagdollComponent
- RectTransform_Binding
- RectTransformComponent
- RegisterReflect
- RenderableComponents
- RigidBodyComponent
- Scene
- SceneManager
- ScriptStringModule
- SoundComponent
- SoundDefinition
- SoundManager
- SphereColliderComponent
- SpriteRenderer
- SpriteSheetComponent
- StateMachineComponent
- TagManager
- TerrainBuffers
- TerrainColliderComponent
- TerrainComponent
- TextComponent
- TransCondition
- Transform
- Transform_Binding
- Transition
- UIButton
- UIComponent
- UIManager
- VolumeComponent
Utility_Framework
- BaseTypeDef
- Benchmark
- BitFlag
- CircularQueue
- ClassProperty
- Core.Assert
- Core.Barrier
- Core.Coroutine
- Core.CountingSemaphore
- Core.Definition
- Core.Fence
- Core.FenceFlag
- Core.Mathf
- Core.Minimal
- Core.OctreeNode
- Core.Property
- Core.Random
- Core.Runtime
- Core.Thread
- Core.ThreadPool
- CoreWindow
- CSVLoader
- DebugStreamBuf
- Delegate
- DeviceResources
- DirectXHelper
- EngineBootstrap
- FileDialog
- FileIO
- GlobalImGuiContext
- HashingString
- HLSLCompiler
- LinkedListLib
- LogEntry
- LogSink
- LogSystem
- MemoryPool
- MetaAlias
- MetaStateCommand
- MetaUtility
- Octree
- PakHelper
- Paklib
- PathFinder
- QuadTree
- Reflection
- RingBuffer
- SimpleIniFile
- SpinLock
- StringHelper
- TimeSystem
- Trim
- TypeDefinition
- TypeIO
- TypeTrait
- WinProcProxy