Can I freeze or disable a GameObjecy?
I'm creating a custom inspector and editor window for positioning weapons. I have a setup scene and want to disable selection of the character only needs not the whole GUI is ths possible?
"I [...] want to disable selection of the character only needs not the whole GUI"
I am sorry but I don't understand what you are trying to describe.
Answer by ElDo · Oct 31, 2015 at 09:16 AM
You can disable GameObjects by unchecking the Checkbox on top of the Inspector just beside the Object's Name. You can also do this by script with somehting like that: gameObject.SetActive(false); (C# example) or simply turn it invisble by unchecking the Checkbox of the Renderer Component in Inspector or again do this by code with: GetComponent<Renderer>().enabled=false; (C# example)
That's not what I need, I want the object to remain visible, but be disabled or frozen so it can't be selected.
Answer by Statement · Oct 31, 2015 at 04:39 PM
You can lock picking in editor to certain layers.
If you want to avoid picking objects from the UI layer for example, click the "Layers" dropdown in the top right corner of the editor and press the lock to the right of the UI layer. You can also hide that layer if you dont want to see it at all.

Thanks this looks like it will do what I need! I need to keep the character visible to I can position elements around it but it not be selectable so I don't accidently move it. Similar to freezing objects in 3D modeling apps.
Your answer