Added Scene-scene as empty base scene and toggle function to Change Session-Button

This commit is contained in:
Thorbjoern
2025-07-19 13:57:32 +02:00
parent 9fd840a8f8
commit 65b8d68461
9 changed files with 629 additions and 127 deletions
+17
View File
@@ -0,0 +1,17 @@
using UnityEngine;
public class ActiveToggle : MonoBehaviour
{
public GameObject gameObject;
public void ToggleActive()
{
gameObject.SetActive(!gameObject.activeSelf);
}
public void ToggleActive(GameObject obj)
{
obj.SetActive(!obj.activeSelf);
Debug.Log(obj.ToString() + "Set Active: " + obj.activeSelf);
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: abd89bb51410b3544b3847550a228b97
+1 -1
View File
@@ -10,7 +10,7 @@ public class ReplaySceneLoader : MonoBehaviour
private int currentScene;
public void LoadSceneAdditive(int sceneIndex)
{
sceneIndex += 1;
sceneIndex += 1; // Um die Basis-Scene nicht zu laden
if(SceneManager.loadedSceneCount > 1)
{
SceneManager.UnloadSceneAsync(currentScene);