So I have this code:
function SomeFunction() {
Debug.Log("Log");
}
class TestClass {
var SomeVar : int = 0;
function Foo() {
SomeFunction();
}
}
And I end up with this error:
BCE0005: Unknown identifier: 'SomeFunction'.
I can’t figure out what’s wrong.
Edit: Also I can’t access variables that are outside class. I need to get something from Unity like prefab etc.