Created
January 18, 2013 02:20
-
-
Save asus4/4561829 to your computer and use it in GitHub Desktop.
デバッグ設定なら、*Debug*.unityをシーンビルドから外す、UnityEditor。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void UpdateScenesInBuild () | |
{ | |
List<EditorBuildSettingsScene> scenes = new List<EditorBuildSettingsScene> (EditorBuildSettings.scenes); | |
bool isDev = EditorUserBuildSettings.development; | |
foreach (EditorBuildSettingsScene scene in scenes) { | |
if (scene.path.Contains ("Debug")) { | |
scene.enabled = isDev; | |
if (isDev) { | |
Debug.Log ("ENABLE SCENE:" + scene.path); | |
} else { | |
Debug.Log ("DISABLE SCENE:" + scene.path); | |
} | |
} | |
} | |
EditorBuildSettings.scenes = scenes.ToArray (); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment