Пример #1
0
        public static string GetInspectorTitle(UnityEngine.Object obj)
        {
            string result;

            if (!obj)
            {
                result = "Nothing Selected";
            }
            else
            {
                string text = ObjectNames.NicifyVariableName(ObjectNames.GetObjectTypeName(obj));
                if (Attribute.IsDefined(obj.GetType(), typeof(ObsoleteAttribute)))
                {
                    text += " (Deprecated)";
                }
                result = text;
            }
            return(result);
        }
Пример #2
0
        public static string GetInspectorTitle(UnityEngine.Object obj)
        {
            string result;

            if (obj == null && obj != null && (obj is MonoBehaviour || obj is ScriptableObject))
            {
                result = " (Script)";
            }
            else if (obj == null)
            {
                result = "Nothing Selected";
            }
            else
            {
                string text = ObjectNames.NicifyVariableName(ObjectNames.GetObjectTypeName(obj));
                if (Attribute.IsDefined(obj.GetType(), typeof(ObsoleteAttribute)))
                {
                    text += " (Deprecated)";
                }
                result = text;
            }
            return(result);
        }