public void OnEnable() { // var properties = this.GetType().GetProperties(); // foreach (var property in properties) // { // var attrs = property.GetCustomAttributes(false); // if(attrs.Length==0||!(attrs[0] is EditorSerializedSimple)) // continue; // Debug.Log(property.Name); // property.SetValue(this,FindProperty(property.Name),null); // // } EmitType = FindProperty("EmitType"); TriggerType = FindProperty("TriggerType"); SourceData = FindProperty("SourceData"); EventActionData = FindProperty("EventActionData"); actionOnEventType = EventActionData.FindPropertyRelative("ActionOnEventType"); curveInterpolation = EventActionData.FindPropertyRelative("Interpolation"); transitionDuration = EventActionData.FindPropertyRelative("Transition"); EmitTimeInterval = FindProperty("EmitTimeInterval"); LogEnabled = FindProperty("EnableEmitterLog"); LookAtListener = FindProperty("LookAtListener"); tmpConstructActions3 = new List <Action>(); tmpConstructActions2 = new List <Action>(); }
public void Initialize(EventActionData data, INodeBlock owner) { this.data = data; this.owner = owner; base.expanded = true; if (data.eventType == EventActionData.EventType.Or) { title = "OR"; EnableInClassList("or-block", true); m_CollapseButton.RemoveFromHierarchy(); } else { if (UIElementGraph.richText) { this.Q("title-label").RemoveFromHierarchy(); richTitle = new RichLabel { name = "title-label" }; titleContainer.Insert(0, richTitle); } if (richTitle != null) { title = ""; richTitle.text = data.displayName; } } Repaint(); try { InitializeView(); } catch (System.Exception ex) { uNodeDebug.LogException(ex, owner.nodeView.targetNode); Debug.LogException(ex, owner.nodeView.targetNode); } RefreshPorts(); expanded = data.expanded; }
public HierarchyBlockTree(TreeViewItem owner, EventActionData block, int id, int depth = -1) : base(id, depth, block.GetRichName()) { this.owner = owner; this.block = block; }