コード例 #1
0
        private void _DrawAndroid_KeystoreName(AndroidConfig config)
        {
            var keystoreName = config.keystoreName;

            _DrawOpenFilePanel("Keystore Location:", "Selection Location", ref keystoreName, "keystore");
            config.keystoreName = keystoreName;
        }
コード例 #2
0
 private void _DrawAndroid_KeytorePass(AndroidConfig config)
 {
     using (new LayoutHorizontalScope(0))
     {
         GUILayout.Label("Store Password:", _buttonWidth);
         config.keystorePass = GUILayout.TextField(config.keystorePass ?? string.Empty);
     }
 }
コード例 #3
0
        private BuildOptions _DrawBuildOptions(AndroidConfig config)
        {
            BuildOptions options = BuildOptions.None;

            EditorGUILayout.Space();

            _DrawDevelopmentBuild(ref options);
            _DrawConnectProfiler(ref options);
            _DrawAllowDebugging(ref options);

            return(options);
        }
コード例 #4
0
        private void _DrawBuild(AndroidConfig config, BuildOptions options, ref ProcessQueue processQueue)
        {
            var isBuild = GUILayout.Button("Build Android", _buttonWidth);

            if (isBuild)
            {
                var apkPath = config.apkPath;
                if (string.IsNullOrEmpty(apkPath))
                {
                    EditorUtility.DisplayDialog("Warning", "Please choose a Project Location", "Ok");
                    return;
                }

                PlayerSettings.Android.keystoreName = config.keystoreName;
                PlayerSettings.Android.keystorePass = config.keystorePass;
                PlayerSettings.Android.keyaliasName = Path.GetFileName(config.keystoreName);
                PlayerSettings.Android.keyaliasPass = config.keystorePass;
                AssetDatabase.SaveAssets();
                AssetDatabase.Refresh();

                var result = BuildPipeline.BuildPlayer(_GetLevels(), apkPath, BuildTarget.Android, options);
                if (!string.IsNullOrEmpty(result))
                {
                    Console.Error.WriteLine(result);
                    return;
                }

                processQueue = new ProcessQueue();

                if (config.builtinResources)
                {
                    processQueue.Enqueue(_UnpackApk);
                    processQueue.Enqueue(_PackApkResoucesAndRepackApk);
                    processQueue.Enqueue(_JarsignerRepackedApk);
                }

                if (config.autoInstall)
                {
                    processQueue.Enqueue(_InstallApk);
                }
            }
        }