I’m wondering if there is a way to add some custom properties / controls to an spatial that I can easily access on right side of the scene composer.
For example:
You have an object that is supposed to drop a certain item if it gets destroyed.
So when I add this object into my scene I want to have these information on the right side:
isDestroyable
life
model after destruction
item to drop
These options should be available everytime I add an item into the scene! It does not matter if I add a tree or a car. All my Items ingame are objects
from the class “Entity” which holds things like isDestroyable etc.
So basically:
Can I add methods and parameters from my class Entity to every item I added into the scene without loading them each time?
I saw the tutorial from Norman Hansen how he added a rotation control to a windmill.
But I dont see anything change in the object options.
Is there a way? That would make the scene editing a lot easier!
you can use UserData on a spatial. UserData can be primitive classes or custom Classes that implements the Savable interface. The SDK builds a form based on reflection.
Also, this is usually not a good idea to have such a strong dependency between your game logic objects and your presentation objects.
I see what you mean but imagine you want to create a big world with a lot of trees that are “chopable” so it would be horrible to add them all per code
Sure you could make an algorythm for that but I just want to create a level in the scene Composer and the game recognizes the trees as chopable.
You know what I mean?