Hello,
I’m executing a script on a game object and I’m trying to find a way of getting the object variables object ID via the script, so I can can access the object variables. I’m know how to access the variables by using an Object ID, but I don’t know how to get that id from the object by code.
My coding skills are at a beginner level so a detailed explanation would be great if anyone can help?
Thanks
Here's an example on how to get it from a game object (with complete namespace for the component):
string objectID = gameObject.GetComponent<GamingIsLove.Makinom.Components.ObjectVariablesComponent>().settings.objectID;
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!