protected virtual void OnValidate() { if (_subdividerElement == null) { _subdividerElement = GetComponent <SubdividerElement>(); } }
private void OnValidate() { if (subdivider == null) { subdivider = GetComponent <SubdividerElement>(); } }
protected virtual void OnValidate() { if (healthComponent == null) { healthComponent = GetComponent <Health>(); } if (subdividerElement == null) { subdividerElement = GetComponent <SubdividerElement>(); } }
private void SpawnChild() { SubdividerElement spawnedChild = Instantiate(prefab); spawnedChild.Initialize(subdividerElement.CurrentLevel + 1, subdividerElement.Name); }
private void SpawnChild() { SubdividerElement spawnedChild = Instantiate(Prefab); spawnedChild.Initialize(CurrentLevel + 1, ObjectName); }