- Home /
How to get first script from gameobject while having propery : Unity
hello, I would like to get the first script in an gameobject, and still be able to set and get proper's of it. I'm coding in c# in unity I have tried "GetComponents(typeof(MonoBehaviour))" , "MonoBehaviour[] scripts = gameobject.GetComponents()" and other methods but all of that methods does not let you set and get
I dont know if it is even possible, and if it is not a i work around would be nice. Thanks
(If you need more info about this please comment and ill try to answer)
Comment