|
I'm having trouble refrencing a javascript that is attached to my HUD GameObject from one of my C# scripts. Is there a way to do it that would help me access a funtion from the javascript on the HUD GameObject? This is what I was trying...
(comments are locked)
|
|
The easiest two methods: 1) Put the js file into a folder called Plugins in the root of the project panel (i.e. Project/Assets/Plugins), then use it as if it were a c# component:
2) Use SendMessage instead of going through GetComponent and calling the function. This is going to be slower however:
(comments are locked)
|
