//shell脚本直接调用这个静态方法 static void BuildForIPhone() {//Function.DeleteFolder(Application.dataPath + "/Plugins/Android"); Packager.BuildiPhoneResource(); if (Function.projectName == "91") { //Function.CopyDirectory(Application.dataPath + "/91", Application.dataPath + "/Plugins/Android"); //PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Android, "USE_SHARE"); } PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.iOS, "USE_SHARE"); //这里就是构建xcode工程的核心方法了, //参数1 需要打包的所有场景 //参数2 需要打包的名子, 这里取到的就是 shell传进来的字符串 91 //参数3 打包平台 BuildPipeline.BuildPlayer(GetBuildScenes(), Function.projectName, BuildTarget.iOS, BuildOptions.None); }
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"); } } }