I get this error:
Assets/Nathansassets/Game Music.cs(1,28): error CS8025: Parsing error
Whenever I try to compile this C# script.
private static var instance: MyUnitySingleton
public static function GetInstance() : MyUnitySingleton {
return instance;
}
function Awake() {
if (instance != null && instance != this) {
Destroy(this.gameObject);
return;
} else {
instance = this;
}
DontDestroyOnLoad(this.gameObject);
}
I have no idea what the problem is, to me the code seems almost flawless.