- Home /
Question by
SebastianPatric · Jan 30, 2014 at 11:46 PM ·
editoreditor-scriptingeditor extension
Any way to invisibly tag an object?
I'm looking for a way I can mark objects instantiated by my editor script in a way that my script can recognize when checking the scene but the user will never see.
Comment
Answer by TheDDestroyer12 · Sep 05, 2014 at 11:19 AM
That depends on what your object are doing. If it just are going to hold a bunch of scripts, you should create an "Empty GameObject". It is a mesh (object) that you want to see in the editor, you should set the object to be inactive in your script, like this:
yourObject.SetActive( false );
By doing that, I think you will be able to acces the object, because you have reference to it before you set it to be inactive. Correct me if I'm wrong.