/*--------------------------------------------------------------------------------------------*/ private void SendTreeUpdates(int pDepth) { //Debug.Log(new string('-', pDepth)+"SendTreeUpdates: "+gameObject.name, gameObject); if (vIsDestroyed) { return; } gameObject.GetComponents(TreeUpdatablesThisFrame); FindTreeChildren(); for (int i = 0; i < TreeUpdatablesThisFrame.Count; i++) { ITreeUpdateable treeUp = TreeUpdatablesThisFrame[i]; if (!treeUp.isActiveAndEnabled) { continue; } treeUp.TreeUpdate(); } DidTreeUpdateThisFrame = true; TreeDepthLevelThisFrame = pDepth; }
/*--------------------------------------------------------------------------------------------*/ private void SendTreeUpdates(int pDepth) { if (vIsDestroyed) { return; } for (int i = 0; i < TreeUpdatablesThisFrame.Count; i++) { ITreeUpdateable treeUpdateable = TreeUpdatablesThisFrame[i]; if (treeUpdateable == null) { if (!ReloadTreeChildrenOnUpdate) { ReloadTreeChildrenOnUpdate = true; Debug.LogError("Lost tree sibling, will refresh list next frame: " + i, this); } continue; } if (!treeUpdateable.isActiveAndEnabled) { continue; } //Profiler.BeginSample(treeUpdateable.TypeName ?? "TreeUpdate"); treeUpdateable.TreeUpdate(); //Profiler.EndSample(); } }