public static void CreateScript(RectTransform rect, UIPipelineType pipelineType) { var creator = new YuLegoPipelineHandlerScriptCreator(rect, pipelineType); creator.CreateScript(); }
private static void CreateLegoUIPipelineHandler(UIPipelineType pipelineType) { if (CurrentGo.GetComponent <YuLegoViewHelper>() == null && CurrentGo.GetComponent <YuLegoComponentHelper>() == null) { EditorUtility.DisplayDialog( "错误", "必须是一个界面或者组件!", "OK" ); return; } YuLegoPipelineHandlerScriptCreator.CreateScript( CurrentGo.GetComponent <RectTransform>(), pipelineType); AssetDatabase.Refresh(); }