Example #1
0
 protected virtual void OnValidate()
 {
     if (_subdividerElement == null)
     {
         _subdividerElement = GetComponent <SubdividerElement>();
     }
 }
Example #2
0
 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);
    }