123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- #if UNITY_EDITOR
- using UnityEditor;
- using UnityEngine;
- namespace Animancer.Editor
- {
-
-
-
-
-
-
- #if ANIMANCER_SCRIPTABLE_OBJECT_EDITOR
- [CustomEditor(typeof(ScriptableObject), true, isFallback = true), CanEditMultipleObjects]
- #endif
- public class ScriptableObjectEditor : UnityEditor.Editor
- {
-
-
-
- public override void OnInspectorGUI()
- {
- base.OnInspectorGUI();
- if (target != null &&
- EditorApplication.isPlayingOrWillChangePlaymode &&
- EditorUtility.IsPersistent(target))
- {
- EditorGUILayout.HelpBox("This is an asset, not a scene object," +
- " which means that any changes you make to it are permanent" +
- " and will NOT be undone when you exit Play Mode.", MessageType.Warning);
- }
- }
-
- }
- }
- #endif
|