- Home /
Stupid question, but bow do I access a variable that is inside the same object my script is?
I want to access isTrigger in a collider. The collider and my script are in the same object. Help?
Comment
Hi Doneyes,
I recommend updating your question with the script you are using, you will then get some quick responses for this one.
suggest unityGE$$anonymous$$S.com for excellent articles on this
I wasn't aware of that site Fattie. Added to my resource bookmarks!
Answer by Montraydavis · Oct 25, 2012 at 04:27 PM
var MyCollider : (ColliderType);
MyColldier = GameObject.Find("ObjectName").GetComponent ( ColliderType );
MyCollider.isTrigger = true ;
Is that what you are trying to do ? I am a bit confused as to what you need help with.