// Update is called once per frame void Update() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } instance = this; }
// Start is called before the first frame update void Start() { instance = GetComponent <MarkerSingleton>(); }