In my networked game I currently have a system through which players (with proper account privileges) can edit the parameters of objects in the world. Currently, the system works perfectly for objects that have spawned AFTER the server has started - I identify the objects by their net ID and send a command to the server telling them to do something to the object with that NetID. Everything is good. Except now I need to extend this to also handle objects that are placed in the scene through the editor. If I try to use their netID, the changes are directed towards a different object. The NetID of objects created as the scene loads do not seem to be unique identifiers.
I could probably identify those scene objects through their scene ID (I think this would be the same across clients) but then I have to handle two cases throughout the message handling code - was the object created with the scene or later spawned? How would I even detect whether an object was created with the scene or spawned?
Can I get/assign unique identities for objects both spawned with the scene and spawned at runtime?
I do not need a system to look up objects by their unique ID. I already have a system in-place that will support whatever ID mechanism I end up using. All it needs to do is guarantee that scene objects and spawned objects can be uniquely identified, preferably without having the handle those as two separate cases too often.