void OnEnable() { //获取当前编辑自定义Inspector的对象 element = new SerializedObject(target); dolist = element.FindProperty("DoList"); SimpleStoryElement _target = (SimpleStoryElement)target; showActionList = new bool[dolist.arraySize]; }
//添加故事管理器 public void AddSompleStoryElement(SimpleStoryElement element) { if (!SimpleStoryElements.Contains(element)) { SimpleStoryElements.Add(element); Debug.Log("已添加故事管理器。 " + element.transform); } else { Debug.Log("已经包含了这个故事管理器! " + element.transform); } }