public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
    {
        //TODO: move this to somewhere called less frequently
        CSActionWrapper actionWrapper = EditorHelper.GetObjectFromSerializedProperty(property) as CSActionWrapper;

        if (actionWrapper == null)
        {
            return;
        }

        actionWrapper.Load();

        if (GUI.Button(position, actionWrapper.ToString()))
        {
            CSActionWrapperWindow window = EditorWindow.GetWindow(typeof(CSActionWrapperWindow)) as CSActionWrapperWindow;

            //Set the window object reference
            window.actionWrapper    = actionWrapper;
            window.serializedObject = property.serializedObject;
            window.Show();
        }
    }
예제 #2
0
 //---------------------------------------------------------------------------------------------
 // Constructor
 //---------------------------------------------------------------------------------------------
 public CSActionWrapper(CSActionWrapper copyFrom)
 {
     m_type           = copyFrom.m_type;
     m_serializedData = copyFrom.m_serializedData;
 }
예제 #3
0
 //---------------------------------------------------------------------------------------------
 // Constructor
 //---------------------------------------------------------------------------------------------
 public CSEffect(CSEffect copyFrom)
 {
     m_event  = new CSEventWrapper(copyFrom.m_event);
     m_action = new CSActionWrapper(copyFrom.m_action);
 }