unity/EditorPlugin/SinceUnity.7000.0/FindUsages/Window/FindUsagesTreeView.cs [82:110]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - var animator = new FindUsagePathElement(3) {id = 4, displayName = "Animator"}; var startId = 200_000; foreach (var animatorElement in myState.AnimatorElements.ToArray()) { CreateAnimatorSubTree(animator, animatorElement, ref startId); } return animator; } private void CreateAnimatorSubTree([NotNull] FindUsagePathElement findUsagePathElement, [NotNull] AnimatorElement animatorElement, ref int id) { var currentParent = findUsagePathElement; for (int i = 0, pathElementsLength = animatorElement.PathElements.Length; i < pathElementsLength; i++) { var icon = i == pathElementsLength - 1 ? animatorElement.TerminalNodeImage : AnimatorElement.AnimatorStateMachineIcon; var findUsagesTreeViewItem = new FindUsagesTreeViewItem(id, animatorElement) { id = id, displayName = animatorElement.PathElements[i], icon = (Texture2D) EditorGUIUtility.IconContent(icon).image }; myFindResultItems[id] = findUsagesTreeViewItem; myAnimatorItemIdToPathElementsCount[id] = i + 1; currentParent.AddChild(findUsagesTreeViewItem); currentParent = findUsagesTreeViewItem; id++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - unity/EditorPlugin/Unity.2019.2/FindUsages/Window/FindUsagesTreeView.cs [82:110]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - var animator = new FindUsagePathElement(3) {id = 4, displayName = "Animator"}; var startId = 200_000; foreach (var animatorElement in myState.AnimatorElements.ToArray()) { CreateAnimatorSubTree(animator, animatorElement, ref startId); } return animator; } private void CreateAnimatorSubTree([NotNull] FindUsagePathElement findUsagePathElement, [NotNull] AnimatorElement animatorElement, ref int id) { var currentParent = findUsagePathElement; for (int i = 0, pathElementsLength = animatorElement.PathElements.Length; i < pathElementsLength; i++) { var icon = i == pathElementsLength - 1 ? animatorElement.TerminalNodeImage : AnimatorElement.AnimatorStateMachineIcon; var findUsagesTreeViewItem = new FindUsagesTreeViewItem(id, animatorElement) { id = id, displayName = animatorElement.PathElements[i], icon = (Texture2D) EditorGUIUtility.IconContent(icon).image }; myFindResultItems[id] = findUsagesTreeViewItem; myAnimatorItemIdToPathElementsCount[id] = i + 1; currentParent.AddChild(findUsagesTreeViewItem); currentParent = findUsagesTreeViewItem; id++; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -