HI there,
I just want to make sure I have something under my belt.
I want to declare a var, which will getComponent(script) as a class var. (Class var being what I think as declared out side the first function, assessable throughout the script).
I have…
var scriptData : scriptScript = scriptAttachedObject.GetComponent(scriptScript);
and or…
var scriptData = scriptAttachedObject.GetComponent(scriptScript);
both create the error that…
…so what that means to me is that the object, script is not being recognized. It has not been defined.
This method works in a function, but how can I get it to work outside a function as a class variable.
Forgive me if my terminology is incorrect but I believe I am right.
Thanks
Ren