Пример #1
0
        public void InitEventWatcher(Action <EventArg> rAction)
        {
            var rBoundEvent = DataBindingTypeResolve.MakeViewDataBindingEvent(this.gameObject, this.ViewEvent);

            if (rBoundEvent != null)
            {
                this.mUnityEventWatcher = new UnityEventWatcher(rBoundEvent.Component, rBoundEvent.Name, rAction);
            }
            else
            {
                Debug.LogErrorFormat("Can not parse bound event: {0}.", this.ViewEvent);
            }
        }
Пример #2
0
        public void InitEventWatcher()
        {
            var rBoundEvent = DataBindingTypeResolve.MakeViewDataBindingEvent(this.gameObject, this.EventPath);

            if (rBoundEvent != null)
            {
                this.mUnityEventWatcher = new UnityEventWatcher(rBoundEvent.Component, rBoundEvent.Name, this.SyncFromView);
            }
            else
            {
                Debug.LogErrorFormat("Can not parse bound event: {0}.", this.EventPath);
            }
        }