Changing Item/Model Properties in the Scene Composer?

Hi Guys! :slight_smile:

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 :smiley:
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?

Build your scene in the scenecomposer, record the location and rotation of every tree, take them out, then add them all in via code

Or use one of the vegetation systems the community has made, with a few of your own modifications, putting your own spatials in