Added Scene-scene as empty base scene and toggle function to Change Session-Button
This commit is contained in:
@@ -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
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user