예제 #1
0
        /// <summary>
        /// Ensure all settings for the Wearable Demo build are in place.
        /// </summary>
        private static bool SetBuildSettingsForWearableDemo(out EditorBuildSettingsScene[] buildScenes)
        {
            buildScenes = new EditorBuildSettingsScene[WEARABLE_DEMO_SCENE_GUIDS.Length];
            for (var i = 0; i < WEARABLE_DEMO_SCENE_GUIDS.Length; i++)
            {
                buildScenes[i] = new EditorBuildSettingsScene
                {
                    path    = AssetDatabase.GUIDToAssetPath(WEARABLE_DEMO_SCENE_GUIDS[i]),
                    enabled = true
                };

                if (string.IsNullOrEmpty(buildScenes[i].path))
                {
                    Debug.LogErrorFormat(CANNOT_BUILD_MISSING_SCENE_ERROR_MESSAGE, WEARABLE_DEMO_PRODUCT_NAME);
                }
            }

            var buildTargetGroup = BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget);

            PlayerSettings.productName   = WEARABLE_DEMO_PRODUCT_NAME;
            PlayerSettings.bundleVersion = APP_VERSION;
            PlayerSettings.SetApplicationIdentifier(buildTargetGroup, WEARABLE_DEMO_APP_IDENTIFIER);
            TrySetAppIcons(WEARABLE_DEMO_ICON_GUID, buildTargetGroup);

            SetSplashSettings();

            AssetDatabase.SaveAssets();

            return(buildScenes.Length > 0 &&
                   buildScenes.All(x => !string.IsNullOrEmpty(x.path) && x.enabled));
        }
예제 #2
0
        /// <summary>
        /// Ensure all settings for the Wearable Proxy build are in place.
        /// </summary>
        private static bool SetBuildSettingsForWearableDemo(out EditorBuildSettingsScene[] buildScenes)
        {
            buildScenes = new EditorBuildSettingsScene[WearableDemoSceneGuids.Length];
            for (var i = 0; i < WearableDemoSceneGuids.Length; i++)
            {
                buildScenes[i] = new EditorBuildSettingsScene
                {
                    path    = AssetDatabase.GUIDToAssetPath(WearableDemoSceneGuids[i]),
                    enabled = true
                };

                if (string.IsNullOrEmpty(buildScenes[i].path))
                {
                    Debug.LogErrorFormat(CannotBuildMissingSceneErrorMessage, WearableDemoProductName);
                }
            }

            var buildTargetGroup = BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget);

            PlayerSettings.productName   = WearableDemoProductName;
            PlayerSettings.bundleVersion = AppVersion;
            PlayerSettings.SetApplicationIdentifier(buildTargetGroup, WearableDemoAppIdentifier);
            TrySetAppIcons(WearableDemoIconGuid, buildTargetGroup);
            AssetDatabase.SaveAssets();

            return(buildScenes.Length > 0 &&
                   buildScenes.All(x => !string.IsNullOrEmpty(x.path) && x.enabled));
        }