void InitClass() { cmpWin = cmpGo.GetComponent <ComplexListWindow>(); if (cmpWin == null) { LogManager.LogError("Can't found ComplexListWindow in QuestList."); } cmpWin.maxTextLength = 85; treeNode = treeGo.GetComponent <TreeControl>(); if (treeNode == null) { LogManager.LogError("Can't found TreeControl in QuestList."); } treeNode.AddItemInputDelegate(TreeItemClickDelegate); }