private void SyncSceneSelection(int[] selectedNodeIDs) { List <int> list = new List <int>(); for (int i = 0; i < selectedNodeIDs.Length; i++) { int id = selectedNodeIDs[i]; AnimationWindowHierarchyNode animationWindowHierarchyNode = this.m_HierarchyData.FindItem(id) as AnimationWindowHierarchyNode; if (!(this.m_RootGameObject == null) && animationWindowHierarchyNode != null) { if (!(animationWindowHierarchyNode is AnimationWindowHierarchyMasterNode)) { Transform transform = this.m_RootGameObject.transform.Find(animationWindowHierarchyNode.path); if (transform != null && this.m_RootGameObject != null && this.m_RootGameObject.transform == AnimationWindowUtility.GetClosestAnimationComponentInParents(transform)) { list.Add(transform.gameObject.GetInstanceID()); } } } } Selection.instanceIDs = list.ToArray(); }