How would I go about running a script at runtime without it being attached to an object? It makes very little sense to just make an object so I can run one script.
I dont want to stick the code into some random place, or call it from another object.
It’s common to make an empty game object and attach manager-type scripts to it. It might seem weird at first, but after a while, it seems weird not to do it that way…
–Eric
ah thanks, well I will submit to that. One more thing if you dont mind. Is the only way to add “screen space” text and gui items by doing it in script?
eg text positioned at 5,5
Nope, just do GameObject → Create Other → GUITexture/Text
–Eric
The MathFx script http://www.unifycommunity.com/wiki/index.php?title=Mathfxasks the user to add this line at the top of their script if they want to use the functions (I think it is a directive-I’m a noob to UnityScript): import MathFX;
I can’t get to work yet. I get this error message: Namespace ‘MathFX’ not found, maybe you forgot to add an assembly reference?
Are you using the JS version?
If you use the C# one, just use MathFX.somefunction