WARNING THIS LIBRARY IS STILL UNDER CONSTRUCTION AND NOT READY FOR PRODUCTION YET.
Editor for entt libary, using their build in reflection system
We add a layer ontop of entt's build in Reflection system allowing you to use these types inline.
With support of properties we can draw types any way we want.
We also provide you with a framework to add reflect any custom type allowing you to easily add support for drawing your own types to Imgui. And add custom properties support by the types.
Include Entt and ImGui in your project.
Include this project in your repo.
If you do not use GLM do not include GlmMetaInspectors
(Idealy you build your own high level window as it allows you to draw hierachies, But for sake of getting started quickly we provide a demo window !)
- Create a instance of the
DemoWindow::DemoEntityWindowfound inExamples/ExampleEntityWindow, Pass in the registery. (Lifetime of the EntityWindow should not exceed the registeries) - Call
DemoEntityWindow::Draw(true)within imgui draw context.
This should show you a imgui window like shown below

The Examples/ExampleEntityWindow.hcontains an example TransformComponent and NameComponent which are fully reflected !
- Within the body of the component Add the
REFLECT()Macro. For this make sure to include"EnttEditor/MetaReflect.h"
-
in the cpp file we add the
IMPLEMENT_REFLECT_COMPONENT(<CLASS>)and include"EnttEditor/MetaReflectImplement.h"(DO NOT INCLUDE THIS IN THE HEADER) -
Give this a body and add the variables & functions with the entt::meta system. We provide a few extra Defines to make your life easier, these can be found in
"EnttEditor/MetaReflect.h"A good example is the PROP_DISPLAYNAME or PROP_READONLY (PROP is used as aprefix for properties for data) -
Make sure to finish with
FinishReflect()macro.
Full example below:

