As I can assign a script to an object using JavaScript?
I have a script called "MyScript". And i have an object called "MyCube".
I want to assign the script to the object in javascript
thanks
As I can assign a script to an object using JavaScript?
I have a script called "MyScript". And i have an object called "MyCube".
I want to assign the script to the object in javascript
thanks
this is one computational intensive way:
GameObject.Find("MyCube").AddComponent("MyScript");
Just drag a drop the script to your game object.
Did you ever figure this out? Getting the same exact behavior... reverting does nothing, and dragging it fresh doesn't either! Seems permanently broken :/
– thatscraigz
you mean: "How can I assign a script to an object using javascript".
– cregox