예제 #1
0
        public static Annotation GetAnnotation(Type type)
        {
            if (typeof(MonoBehaviour).IsAssignableFrom(type))
            {
                var scriptClass = EditorUnityObjectUtility.GetScriptClass(type);

                if (!scriptAnnotations.ContainsKey(scriptClass))
                {
                    return(null);
                }

                return(scriptAnnotations[scriptClass]);
            }
            else
            {
                var classId = EditorUnityObjectUtility.GetClassID(type);

                if (!unityAnnotations.ContainsKey(classId))
                {
                    return(null);
                }

                return(unityAnnotations[classId]);
            }
        }
예제 #2
0
 public MemberOptionTree(UnityObject target, MemberFilter memberFilter, TypeFilter memberTypeFilter, MemberAction action)
     : this(EditorUnityObjectUtility.GetUnityTypes(target), memberFilter, memberTypeFilter, action)
 {
     rootMode = RootMode.Types;
 }