-
-
Save anchan828/6665d545062d07b8210b to your computer and use it in GitHub Desktop.
This file contains 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
using UnityEditor; | |
using System.Collections.Generic; | |
public class Question9 | |
{ | |
private static List<string> scenePaths = new List<string>(); | |
[MenuItem("File/AdditiveScenes")] | |
static void Additive() | |
{ | |
scenePaths.Clear(); | |
while (true) | |
{ | |
string sceneParh = EditorUtility.OpenFilePanel("Select Additive Scene", "Assets/Question8", "unity"); | |
if (string.IsNullOrEmpty(sceneParh)) | |
{ | |
break; | |
} | |
scenePaths.Add(sceneParh); | |
} | |
foreach (var scenePath in scenePaths) | |
{ | |
string projectRelativePath = FileUtil.GetProjectRelativePath(scenePath); | |
EditorApplication.OpenSceneAdditive(projectRelativePath); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment