Hi there,
I'm currently working on a project which started from the LevelEditor codebase, with the goal of creating an Editor which is similar to the way of building a scene in Unity.
LevelEditor versus Unity philosophy :
In LevelEditor, the game objects are specialized to add functionalities to them. Per instance one of them is a Locator which allows to add a Model resource to the game object, another one is a DirectionLight etc...
In Unity, the philosophy is different. Game objects are generic, and can be understood solely as containers, and instead of specializing them, we add components to them in order to add functionality : A ModelRenderer component, a Camera component, etc...
The reason why we find Unity approach better is because it is very flexible and allow an infinite combination of behaviors for our game objects. But maybe this is not a debate i would like to start, but more an introduction to what we are trying to do, starting from the LevelEditor.
What we did so far
So so far we only use the GameObjectGroup, which behave like a Unity game object, a container which can contain components and allow parenting.
In the process I have created a bunch of components, for static models, skeleton animated models, camera, light, colliders, etc... And also a bunch of new tools : a camera preview, a material editor. This is working great so far, although it feels going away from the philosophy of the LevelEditor.
My questions :
Is it possible to implement drag and drop functionality in the PropertyEditor ?
Per instance I have a field in my ModelRenderer component which is using a FileUriEditor to pick up what model i want to use with this component. Or in a material collection I have a bunch of materials, each of them with a field where I can select the material filename to use for this particular model material slot. What I would like to be able to do is to be able to drag and drop my resources directly from the ResourceLister into this particular control, instead of having to click on the [...] button to select a filename.
Could someone please point me in the direction to be able to implement such functionality ?
I thought about few ways but I'm not too sure what is possible, still quite confused about ATF.
- Is it possible to have a tree editor inside the PropertyGrid (that may be a solution to implement drag and drop on collections but maybe not ideal)?
- Is it possible to have the FileUriEditor accepting Drag&Drop and raising corresponding events ?
Thanks for reading, and the hard work on ATF and the LevelEditor!
Pierre