public static void CreateScriptUICode(ScriptKitInfo info) { mScriptKitInfo = info; var objs = Selection.GetFiltered(typeof(GameObject), SelectionMode.Assets | SelectionMode.TopLevel); var displayProgress = objs.Length > 1; if (displayProgress) { EditorUtility.DisplayProgressBar("", "<color=#EE6A50>ScriptKit:Create ScriptUI Code...</color>", 0); } for (var i = 0; i < objs.Length; i++) { mInstance.CreateCode(objs[i] as GameObject, AssetDatabase.GetAssetPath(objs[i])); if (displayProgress) { EditorUtility.DisplayProgressBar("", "<color=#EE6A50>ScriptKit:Create ScriptUI Code...</color>", (float)(i + 1) / objs.Length); } } AssetDatabase.Refresh(); if (displayProgress) { EditorUtility.ClearProgressBar(); } }
public static void CreateHotScriptCode() { Debug.Log("<color=#EE6A50> >>>>>>>Create ToLua Code </color>"); var info = new ScriptKitInfo(); info.HotScriptType = mToLua; info.HotScriptFilePath = mFilePath; info.HotScriptSuffix = mFileSuffix; info.Templates = mTemplates; info.CodeBind = mScriptCodeBind; UICodeGenerator.CreateScriptUICode(info); }