private void OnEnable() { MMessage = ((MessagesBehavior)target); sp_messagesONEXIT = serializedObject.FindProperty("onExitMessage"); onEnterMessage = serializedObject.FindProperty("onEnterMessage"); onTimeMessage = serializedObject.FindProperty("onTimeMessage"); UseSendMessage = serializedObject.FindProperty("UseSendMessage"); NormalizeTime = serializedObject.FindProperty("NormalizeTime"); debug = serializedObject.FindProperty("debug"); script = MonoScript.FromScriptableObject(MMessage); listOnEnter = new ReorderableList(serializedObject, onEnterMessage, true, true, true, true); listOnExit = new ReorderableList(serializedObject, sp_messagesONEXIT, true, true, true, true); listOnTime = new ReorderableList(serializedObject, onTimeMessage, true, true, true, true); listOnEnter.drawElementCallback = drawElementCallback1; listOnEnter.drawHeaderCallback = HeaderCallbackDelegate1; listOnExit.drawElementCallback = drawElementCallback2; listOnExit.drawHeaderCallback = HeaderCallbackDelegate1; listOnTime.drawElementCallback = drawElementCallback3; listOnTime.drawHeaderCallback = HeaderCallbackDelegate2; }
private void OnEnable() { MMessage = ((MessagesBehavior)target); listOnEnter = new ReorderableList(serializedObject, serializedObject.FindProperty("onEnterMessage"), true, true, true, true); listOnExit = new ReorderableList(serializedObject, serializedObject.FindProperty("onExitMessage"), true, true, true, true); listOnTime = new ReorderableList(serializedObject, serializedObject.FindProperty("onTimeMessage"), true, true, true, true); listOnEnter.drawElementCallback = drawElementCallback1; listOnEnter.drawHeaderCallback = HeaderCallbackDelegate1; listOnExit.drawElementCallback = drawElementCallback2; listOnExit.drawHeaderCallback = HeaderCallbackDelegate1; listOnTime.drawElementCallback = drawElementCallback3; listOnTime.drawHeaderCallback = HeaderCallbackDelegate2; }