Пример #1
0
 //Constructor
 public EditorObjectConnection(EditorObject.EditorObjectMessage message, EditorObject caller, EditorObject subject, EventTransceiver.Events onEvent)
 {
     OnEvent = onEvent;
     Message = message;
     Caller = caller;
     Subject = subject;
     GUID = System.Guid.NewGuid().ToString();
     SetColor();
 }
Пример #2
0
 //Constructor
 public EditorObjectConnection(EditorObject.EditorObjectMessage message, EditorObject caller, EditorObject subject, EventTransceiver.Events onEvent)
 {
     OnEvent = onEvent;
     Message = message;
     Caller  = caller;
     Subject = subject;
     GUID    = System.Guid.NewGuid().ToString();
     SetColor();
 }
Пример #3
0
    void ChooseObject(EditorObject.EditorObjectMessage message)
    {
        if (EditorObject.CurrentHoveredEditorObject == null)
        {
            return;
        }

        ConnectionRegistry.DesignInstance.AddConnection(EditorObject.CurrentHoveredEditorObject, _target, message, Target.AssociatedEvents[_toolbarInt]);

        EditorUtility.SetDirty(ConnectionRegistry.DesignInstance);
        new SerializedObject(ConnectionRegistry.DesignInstance).SetIsDifferentCacheDirty();

        EditorObject.CurrentHoveredEditorObject = null;
        _target.LookingForSubject = false;
    }
Пример #4
0
    public void AddConnection(EditorObject subject, EditorObject caller, EditorObject.EditorObjectMessage message, EventTransceiver.Events onEvent)
    {
        if (ContainsConnection(subject, caller) == null)
        {
            EditorObjectConnection newConnection = EditorObjectConnection.CreateInstance <EditorObjectConnection>();

            newConnection.Message = message;
            newConnection.Caller  = caller;
            newConnection.Subject = subject;
            newConnection.OnEvent = onEvent;

            Registry.Add(newConnection);
            Registry.Sort(_comparer);
        }
        else
        {
            Debug.LogWarning(string.Format("Attempted to add a connection between {0} and {1}, but a connection already exists", subject.ToString(), caller.ToString()), this);
        }
    }
Пример #5
0
 //Constructor
 public EditorObjectConnection(EditorObject.EditorObjectMessage message)
 {
     Message = message;
     GUID = System.Guid.NewGuid().ToString();
     SetColor();
 }
Пример #6
0
 //Constructor
 public EditorObjectConnection(EditorObject.EditorObjectMessage message)
 {
     Message = message;
     GUID    = System.Guid.NewGuid().ToString();
     SetColor();
 }