Newbie Alert, is this component system logical?

Then all Boxes have the “ChangeColorOnShootControl”.

It’s not the UserData, you could for example have a custom node which only has userData, but when you save the whole scene, you save each box separately, all control’s values etc

My BoxControl already equals the ChangeColorOnShootControl. If i attach the other controls in AppState like BoxControl, then AppState will get crowded for me.

And how i can put the UserDatas in seperate Node? Btw, are we talking about same UserData ? Because I am talking about the Spatial.setUserData()

Instead of saving the rootNode, just do:

Node saveNode = new Node();
saveNode.setUserData("boxCount", 100);
1 Like

I got it thank you so much.