void Start() { material = GetComponent <Renderer>().material; manager = GetComponentInParent <SandManager>(); myRenderer = GetComponent <Renderer>(); x = (int)transform.position.x; y = (int)transform.position.y; z = (int)transform.position.z; }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(this); } DontDestroyOnLoad(this); }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(this); } DontDestroyOnLoad(this); BigList.AddRange(new List <GameObject>[] { littleSand, mediumSand, highSand, extremeSand }); }