Ejemplo n.º 1
0
    private static void SceneSaved(Scene scene)
    {
        var original = EditorBuildSettings.scenes;

        for (int i = 0; i < original.Length; i++)
        {
            var s = original[i].path;
            if (s != scene.path)
            {
                continue;
            }

            SaveSceneName.SaveScenesName();
            return;
        }

        var newSettings = new EditorBuildSettingsScene[original.Length + 1];

        System.Array.Copy(original, newSettings, original.Length);
        var sceneToAdd = new EditorBuildSettingsScene(scene.path, true);

        newSettings[newSettings.Length - 1] = sceneToAdd;
        EditorBuildSettings.scenes          = newSettings;

        SaveSceneName.SaveScenesName();
    }
Ejemplo n.º 2
0
    public static void Saved(Scene scene)
    {
        new GameObject("[SETUP]");
        var s = new GameObject("[SCENE]");
        var d = new GameObject("Dynamic");

        d.transform.parent = s.transform;
        Debug.Log("New scene created!");
        SaveSceneName.SaveScenesName();
    }