void Start() { activatorScript = GameObject.Find("CullingObject").GetComponent <DrawDistanceActivator>(); activatorScript.cullableObjects.Add(new CullableObject { obj = this.gameObject, objPos = transform.position }); }
private void Awake() { if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } SceneManager.sceneLoaded += OnSceneLoaded; }