protected override void initialization() { base.initialization(); BaseRigsterUtils.init(); this.titleContent = new GUIContent("技能"); EditorConfigUtils.load(); resourcePath = EditorConfigUtils.ProjectResource; resourcePath = resourcePath.Replace("\\", "/"); string basePrefabPath = ""; PathDefine.effectPath = "file:///" + basePrefabPath; PathDefine.avatarPath = "file:///" + basePrefabPath; PathDefine.scenePath = "file:///" + basePrefabPath; PathDefine.soundPath = "file:///" + basePrefabPath; EditorBox vbox = new EditorBox(); vbox.widthOption = GUILayout.Width(300); vbox.styleString = "box"; tabNav = new EditorTabNav(); tabNav.addEventListener(EventX.CHANGE, tabNavHandle); modelWindow = new ModelWindow(); modelWindow.addEventListener(EventX.SELECT, modelSelectHandle); tabNav.addItem("avatar", modelWindow); effectWindow = new ModelWindow(); effectWindow.addEventListener(EventX.SELECT, effectSelectHandle); tabNav.addItem("effect", effectWindow); soundWindow = new ModelWindow(); soundWindow.exNameArr = new[] { "*.mp3", "*.ogg", "*.wav" }; soundWindow.addEventListener(EventX.SELECT, soundSelectHandle); tabNav.addItem("sound", soundWindow); EditorBox box = new EditorBox(false); EditorButton btn; btn = new EditorButton("reload"); btn.addEventListener(EventX.ITEM_CLICK, reload); box.addChild(btn); btn = new EditorButton("updateSVN"); btn.addEventListener(EventX.ITEM_CLICK, updateSVN); box.addChild(btn); btn = new EditorButton("editor"); btn.addEventListener(EventX.ITEM_CLICK, editor); box.addChild(btn); autoMononType = new EditorFormItem("自动代码"); autoMononType.addEventListener(EventX.CHANGE, autoMononTypeHandle); autoMononType.value = autoMononTypeName; vbox.addChild(tabNav); vbox.addChild(new EditorFlexibleSpace()); vbox.addChild(autoMononType); vbox.addChild(box); btn = new EditorButton("打包Assetbundle"); btn.addEventListener(EventX.ITEM_CLICK, assetbundleClickHandle); vbox.addChild(btn); addChild(vbox); propertyWindow = new PropertyWindow(); propertyWindow.widthOption = GUILayout.Width(300); timeWindow = new TimeWindow(); timeWindow.addEventListener(EventX.SELECT, timeLineSelectHandle); timeWindow.init(resourcePath + "All/skill/", propertyWindow); addChild(timeWindow); addChild(propertyWindow); reload(null); tabNav.selectedIndex = tabSelectedIndex; modelWindow.selectedIndex = modelSelectedIndex; }
public void init(string configPath, PropertyWindow propertyWindow) { _configPath = configPath; timeLine.propertyWindow = propertyWindow; }