Question by
unity_TP71PYs67oCerw · Jun 23, 2019 at 03:41 PM ·
scripting problemscripting beginnerscriptingbasicsscipting
How to add information to an instantiated object
I need to add an int value to an object in order to make it automatically self-destroy when a certain condition is verified. How can I do that? I have two ideas, the first is to identify every single object that the game instantiate (how?) and then append the value into a list. The second is to simply add a script to the list containing the variable and the auto-deleting script.
I've started using unity one month ago, sorry for the dumb question ;)
Comment