private void Initialize() { if (initialized) { return; } timeLineEvent = target as EventClip; BuildEditTargets(); initialized = true; }
//----- method ----- public void SetTimeLineEvent(EventClip timeLineEvent) { this.timeLineEvent = timeLineEvent; if (timeLineEvent.EventMethods != null) { var allEventMethods = timeLineEvent.EventMethods; onEnterMethods = allEventMethods.Where(x => x.EventType == EventType.Enter).ToArray(); onExitMethods = allEventMethods.Where(x => x.EventType == EventType.Exit).ToArray(); onStayMethods = allEventMethods.Where(x => x.EventType == EventType.Stay).ToArray(); } }