avatar/Assets/VRCSDK/Dependencies/VRChat/Scripts/SceneSaver.cs
2022-09-27 20:47:45 -07:00

19 lines
513 B
C#

using System.Collections;
using UnityEngine;
public class SceneSaver
{
static public void SaveScene()
{
#if UNITY_EDITOR
var activeScene = UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene();
UnityEditor.SceneManagement.EditorSceneManager.SaveScene(activeScene);
UnityEditor.EditorApplication.isPaused = false;
UnityEditor.EditorApplication.isPlaying = false;
UnityEditor.SceneManagement.EditorSceneManager.OpenScene(activeScene.name);
#endif
}
}