void Awake() { if (StaticRef == null) // if theres is not allerdaye a static ref makes this the static ref { DontDestroyOnLoad(gameObject); StaticRef = this; } else if (StaticRef != this) // is the allready is a ref , destory this { Destroy(this); } }