- Home /
How can I set the static checkbox of a GameObject in an editor script?
I'm trying to write an editor script to get models into unity3d (iphone) which have a lot of their setup already dealt with.
I'd like to be able to specify that a transform, or gameobject is static as if i'd ticked the checkbox in the editor, but can't seem to see a way to do this.
Is it possible? What member controls this property?
Cheers
I don't think you can but if it is possible I sure would like to know as well :-)
Answer by andeeee · Jan 25, 2010 at 03:21 PM
The GameObject class has a property called isStatic that you can use from editor scripts.
Thanks a lot. That works great, I was at the transform level and didn't think to peak into the corresponding gameobject. That's great, I can automatically assign static as required now. Cheers
Your answer
Follow this Question
Related Questions
I want to move a cube with rotation but I find this problem 1 Answer
Converting GameObject into Transform? 1 Answer
Is there any way to convert Collision to a Gameobject or Transform? 1 Answer
Difference between Vector3, Transform and GameObject 2 Answers
How to move a gameObject without affecting its childrens' positions? 2 Answers