Mercurial > hg > Game > Games
comparison Orchestland/Assets/OVR/Editor/OVRBuild.cs @ 1:f7675884f2a1
Add Orchestland project
author | Daiki OYAKAWA <e135764@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 17 Jul 2015 23:09:20 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:347d21cdfc22 | 1:f7675884f2a1 |
---|---|
1 /************************************************************************************ | |
2 | |
3 Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved. | |
4 | |
5 Licensed under the Oculus VR Rift SDK License Version 3.2 (the "License"); | |
6 you may not use the Oculus VR Rift SDK except in compliance with the License, | |
7 which is provided at the time of installation or download, or which | |
8 otherwise accompanies this software in either electronic or hard copy form. | |
9 | |
10 You may obtain a copy of the License at | |
11 | |
12 http://www.oculusvr.com/licenses/LICENSE-3.2 | |
13 | |
14 Unless required by applicable law or agreed to in writing, the Oculus VR SDK | |
15 distributed under the License is distributed on an "AS IS" BASIS, | |
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
17 See the License for the specific language governing permissions and | |
18 limitations under the License. | |
19 | |
20 ************************************************************************************/ | |
21 | |
22 using UnityEngine; | |
23 using UnityEditor; | |
24 | |
25 //------------------------------------------------------------------------------------- | |
26 // ***** OculusBuildDemo | |
27 // | |
28 // OculusBuild allows for command line building of the Oculus main demo (Tuscany). | |
29 // | |
30 class OculusBuildDemo | |
31 { | |
32 static void PerformBuildStandaloneWindows () | |
33 { | |
34 string[] scenes = { "Assets/Tuscany/Scenes/VRDemo_Tuscany.unity" }; | |
35 BuildPipeline.BuildPlayer(scenes, "./Win_OculusUnityDemoScene.exe", BuildTarget.StandaloneWindows, BuildOptions.None); | |
36 } | |
37 | |
38 static void PerformBuildStandaloneMac () | |
39 { | |
40 string[] scenes = { "Assets/Tuscany/Scenes/VRDemo_Tuscany.unity" }; | |
41 BuildPipeline.BuildPlayer(scenes, "./Mac_OculusUnityDemoScene.app", BuildTarget.StandaloneOSXIntel, BuildOptions.None); | |
42 } | |
43 | |
44 static void PerformBuildStandaloneLinux () | |
45 { | |
46 string[] scenes = { "Assets/Tuscany/Scenes/VRDemo_Tuscany.unity" }; | |
47 BuildPipeline.BuildPlayer(scenes, "./Linux_OculusUnityDemoScene", BuildTarget.StandaloneLinux, BuildOptions.None); | |
48 } | |
49 | |
50 static void PerformBuildStandaloneLinux64 () | |
51 { | |
52 string[] scenes = { "Assets/Tuscany/Scenes/VRDemo_Tuscany.unity" }; | |
53 BuildPipeline.BuildPlayer(scenes, "./Linux_OculusUnityDemoScene", BuildTarget.StandaloneLinux64, BuildOptions.None); | |
54 } | |
55 } | |
56 | |
57 //------------------------------------------------------------------------------------- | |
58 // ***** OculusBuild | |
59 // | |
60 // OculusBuild adds menu functionality for a user to build the currently selected scene, | |
61 // and to also build and run the standalone build. These menu items can be found under the | |
62 // Oculus/Build menu from the main Unity Editor menu bar. | |
63 // | |
64 class OculusBuild | |
65 { | |
66 // Build the Android APK and place into main project folder | |
67 static void PerformBuildAndroidAPK() | |
68 { | |
69 if (Application.isEditor) | |
70 { | |
71 string[] scenes = { EditorApplication.currentScene }; | |
72 BuildPipeline.BuildPlayer(scenes, "OculusUnityDemoScene.apk", BuildTarget.Android, BuildOptions.None); | |
73 } | |
74 } | |
75 } | |
76 | |
77 //------------------------------------------------------------------------------------- | |
78 // ***** OculusBuildApp | |
79 // | |
80 // OculusBuildApp allows us to build other Oculus apps from the command line. | |
81 // | |
82 partial class OculusBuildApp | |
83 { | |
84 static void SetAndroidTarget() | |
85 { | |
86 if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.Android) | |
87 { | |
88 EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTarget.Android); | |
89 } | |
90 } | |
91 } |