Пример #1
0
        private static void Menu_GO_Search(MenuCommand cmnd)
        {
            if (cmnd.context == null)
            {
                return;
            }
            if (_defaultSearchTool == null)
            {
                _defaultSearchTool = new FindReferencesToObjectMenu();
            }

            GameObject go = GameObjectUtil.GetGameObjectFromSource(cmnd.context);

            if (go == null)
            {
                return;
            }

            int iid = go.GetInstanceID();
            var arr = _defaultSearchTool.Search_Imp(iid);

            //Selection.objects = arr;

            foreach (var obj in arr)
            {
                Debug.Log(obj.GetType().FullName, obj);
                EditorGUIUtility.PingObject(obj.gameObject.GetInstanceID());
            }
        }
        private static void Menu_Search(MenuCommand cmnd)
        {
            if (cmnd.context == null) return;
            if (_defaultSearchTool == null) _defaultSearchTool = new FindReferencesToObjectMenu();

            int iid = cmnd.context.GetInstanceID();
            var arr = _defaultSearchTool.Search_Imp(iid);
            Selection.objects = arr;

            //foreach(var obj in arr)
            //{
            //    EditorGUIUtility.PingObject(obj.GetInstanceID());
            //}
        }
        private static void Menu_Search(MenuCommand cmnd)
        {
            if (cmnd.context == null)
            {
                return;
            }
            if (_defaultSearchTool == null)
            {
                _defaultSearchTool = new FindReferencesToObjectMenu();
            }

            int iid = cmnd.context.GetInstanceID();
            var arr = _defaultSearchTool.Search_Imp(iid);

            Selection.objects = arr;

            //foreach(var obj in arr)
            //{
            //    EditorGUIUtility.PingObject(obj.GetInstanceID());
            //}
        }