Exemplo n.º 1
0
 public static void TryInvoke(this UnityEventGameObject evt, GameObject value)
 {
     if (evt != null)
     {
         evt.Invoke(value);
     }
 }
Exemplo n.º 2
0
    // Custom Unity Event validation
    public void OnValidate()
    {
        response = Event != null && Event.UnityEventType == typeof(UnityEvent) ? response : null;

        responseGameObject = Event != null && Event.UnityEventType == typeof(UnityEventGameObject) ? responseGameObject : null;
        responseTransform  = Event != null && Event.UnityEventType == typeof(UnityEventTransform) ? responseTransform : null;
        responseInt        = Event != null && Event.UnityEventType == typeof(UnityEventInt) ? responseInt : null;
        responseFloat      = Event != null && Event.UnityEventType == typeof(UnityEventFloat) ? responseFloat : null;
        responseBool       = Event != null && Event.UnityEventType == typeof(UnityEventBool) ? responseBool : null;
        responseString     = Event != null && Event.UnityEventType == typeof(UnityEventString) ? responseString : null;
    }