I’m trying to assign a script as a variable so I can easily access variables within this script. I’ve done this before, but for some reason in this specific instance it’s constantly throwing errors when I try to use the assignment, as if it’s unable to find the script I’m referencing.
I’ll post my initialisation code here, even though I was still getting this trouble when I just dragged and dropped the component into the relevant variable slot in the Unity window.
public var player: GameObject; public var x: int; public var y: int; private var found: boolean; var board: GameObject; var mainCode: StuffHolder; mainCode = FindObjectOfType(StuffHolder); private var size: int = mainCode.size;
So I am 99% sure I didn’t screw this up in code and I’m asking… what other ways could I have screwed this up?