static string BeforeBuild() { GameConstConfig config = new GameConstConfig(); config.DevelopMode = false; GameConstJsonGenerator.GenerateByGameConsConfig(config); LuaBinding.Binding(); string exportPath = ""; foreach (var arg in System.Environment.GetCommandLineArgs()) { if (arg.StartsWith("path=")) { exportPath = arg.Split("="[0])[1]; break; } } if (exportPath == "") { Debug.LogError("<color=red>Build Error : export path is null</color>"); return(""); } return(exportPath); }
public void OnGUI() { //GUI.DrawTexture(this.mWelcomeScreenImageRect, this.mWelcomeScreenImage); GUI.Label(this.mWelcomeIntroRect, "欢迎使用ulua,它基于CSTOLUA,将C#类注册进Lua。入门步骤如下:"); GUI.DrawTexture(this.mSamplesImageRect, this.mSamplesImage); GUI.Label(this.mSamplesHeaderRect, "新手入门 - 生成Wrap文件(必须)"); GUI.Label(this.mSamplesDescriptionRect, "单击Lua菜单里面Gen Lua Wrap File子菜单."); GUI.DrawTexture(this.mDocImageRect, this.mDocImage); GUI.Label(this.mDocHeaderRect, "新手入门 - 下载演示框架DEMO SimpleFramework"); GUI.Label(this.mDocDescriptionRect, "单击链接下载:https://github.com/jarjin/"); GUI.DrawTexture(this.mVideoImageRect, this.mVideoImage); GUI.Label(this.mVideoHeaderRect, "新手入门 - 改完注册到Lua的C#类,需清除文件缓存,重新生成"); GUI.Label(this.mVideoDescriptionRect, "单击Lua菜单里面Clear LuaBinder File + Wrap Files子菜单."); GUI.DrawTexture(this.mForumImageRect, this.mForumImage); GUI.Label(this.mForumHeaderRect, "新手入门 - Lua需要统一的UTF-8文件编码"); GUI.Label(this.mForumDescriptionRect, "单击Lua菜单里面Encode LuaFile with UTF-8子菜单."); GUI.DrawTexture(this.mContactImageRect, this.mContactImage); GUI.Label(this.mContactHeaderRect, " 加入技术支持社群"); GUI.Label(this.mContactDescriptionRect, "QQ群:434341400 或者 QQ群:62978170"); GUI.Label(this.mVersionRect, version); flag = GUI.Toggle(this.mToggleButtonRect, flag, "开始时候显示对话框"); if (flag) { PlayerPrefs.SetInt("ShowWelcomeScreen", 1); } else { PlayerPrefs.SetInt("ShowWelcomeScreen", 0); } EditorGUIUtility.AddCursorRect(this.mSamplesImageRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mSamplesHeaderRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mSamplesDescriptionRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mDocImageRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mDocHeaderRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mDocDescriptionRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mVideoImageRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mVideoHeaderRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mVideoDescriptionRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mForumImageRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mForumHeaderRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mForumDescriptionRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mContactImageRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mContactHeaderRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mContactDescriptionRect, MouseCursor.Link); if (Event.current.type == EventType.MouseUp) { Vector2 mousePosition = Event.current.mousePosition; if ((this.mSamplesImageRect.Contains(mousePosition) || this.mSamplesHeaderRect.Contains(mousePosition)) || this.mSamplesDescriptionRect.Contains(mousePosition)) { LuaBinding.Binding(); } else if ((this.mDocImageRect.Contains(mousePosition) || this.mDocHeaderRect.Contains(mousePosition)) || this.mDocDescriptionRect.Contains(mousePosition)) { Application.OpenURL("https://github.com/jarjin/"); } else if ((this.mVideoImageRect.Contains(mousePosition) || this.mVideoHeaderRect.Contains(mousePosition)) || this.mVideoDescriptionRect.Contains(mousePosition)) { LuaBinding.ClearLuaBinder(); } else if ((this.mForumImageRect.Contains(mousePosition) || this.mForumHeaderRect.Contains(mousePosition)) || this.mForumDescriptionRect.Contains(mousePosition)) { LuaBinding.EncodeLuaFile(); } else if ((this.mContactImageRect.Contains(mousePosition) || this.mContactHeaderRect.Contains(mousePosition)) || this.mContactDescriptionRect.Contains(mousePosition)) { Application.OpenURL("http://shang.qq.com/wpa/qunwpa?idkey=20a9db3bac183720c13a13420c7c805ff4a2810c532db916e6f5e08ea6bc3a8f"); } } }
public void OnGUI() { //GUI.DrawTexture(this.mWelcomeScreenImageRect, this.mWelcomeScreenImage); GUI.Label(this.mWelcomeIntroRect, "欢迎使用SimpleFramework,它是个基于uLua/CSTOLUA,\n将C#类注册进Lua,并且附带了AssetBundle管理的演示框架。入门步骤如下:"); GUI.DrawTexture(this.mSamplesImageRect, this.mSamplesImage); GUI.Label(this.mSamplesHeaderRect, "新手入门 - 生成Wrap文件(必须)"); GUI.Label(this.mSamplesDescriptionRect, "单击Lua菜单里面Gen Lua Wrap File子菜单."); GUI.DrawTexture(this.mDocImageRect, this.mDocImage); GUI.Label(this.mDocHeaderRect, "新手入门 - 根据不同平台生成AssetBundle资源(必须)"); GUI.Label(this.mDocDescriptionRect, "单击Game菜单里面Build XXX Resources子菜单."); GUI.DrawTexture(this.mVideoImageRect, this.mVideoImage); GUI.Label(this.mVideoHeaderRect, "新手入门 - 改完注册到Lua的C#类,需清除文件缓存,重新生成"); GUI.Label(this.mVideoDescriptionRect, "单击Lua菜单里面Clear LuaBinder File + Wrap Files子菜单."); GUI.DrawTexture(this.mForumImageRect, this.mForumImage); GUI.Label(this.mForumHeaderRect, "新手入门 - Lua需要统一的UTF-8文件编码"); GUI.Label(this.mForumDescriptionRect, "单击Lua菜单里面Encode LuaFile with UTF-8子菜单."); GUI.DrawTexture(this.mContactImageRect, this.mContactImage); GUI.Label(this.mContactHeaderRect, " 加入技术支持社群"); GUI.Label(this.mContactDescriptionRect, "QQ群:469941220 或者 QQ群:62978170"); GUI.Label(this.mVersionRect, version); flag = GUI.Toggle(this.mToggleButtonRect, flag, "开始时候显示对话框"); if (flag) { PlayerPrefs.SetInt("ShowWelcomeScreen", 1); } else { PlayerPrefs.SetInt("ShowWelcomeScreen", 0); } EditorGUIUtility.AddCursorRect(this.mSamplesImageRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mSamplesHeaderRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mSamplesDescriptionRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mDocImageRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mDocHeaderRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mDocDescriptionRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mVideoImageRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mVideoHeaderRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mVideoDescriptionRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mForumImageRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mForumHeaderRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mForumDescriptionRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mContactImageRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mContactHeaderRect, MouseCursor.Link); EditorGUIUtility.AddCursorRect(this.mContactDescriptionRect, MouseCursor.Link); if (Event.current.type == EventType.MouseUp) { Vector2 mousePosition = Event.current.mousePosition; if ((this.mSamplesImageRect.Contains(mousePosition) || this.mSamplesHeaderRect.Contains(mousePosition)) || this.mSamplesDescriptionRect.Contains(mousePosition)) { LuaBinding.Binding(); } else if ((this.mDocImageRect.Contains(mousePosition) || this.mDocHeaderRect.Contains(mousePosition)) || this.mDocDescriptionRect.Contains(mousePosition)) { if (Application.platform == RuntimePlatform.WindowsEditor) { Packager.BuildWindowsResource(); } if (Application.platform == RuntimePlatform.OSXEditor) { //Packager.BuildiPhoneResource(); } } else if ((this.mVideoImageRect.Contains(mousePosition) || this.mVideoHeaderRect.Contains(mousePosition)) || this.mVideoDescriptionRect.Contains(mousePosition)) { LuaBinding.ClearLuaBinder(); } else if ((this.mForumImageRect.Contains(mousePosition) || this.mForumHeaderRect.Contains(mousePosition)) || this.mForumDescriptionRect.Contains(mousePosition)) { LuaBinding.EncodeLuaFile(); } else if ((this.mContactImageRect.Contains(mousePosition) || this.mContactHeaderRect.Contains(mousePosition)) || this.mContactDescriptionRect.Contains(mousePosition)) { Application.OpenURL("http://shang.qq.com/wpa/qunwpa?idkey=20a9db3bac183720c13a13420c7c805ff4a2810c532db916e6f5e08ea6bc3a8f"); } } }