Added Observation Scene to show the Replay

This commit is contained in:
Thorbjoern
2025-05-26 18:56:25 +02:00
parent 37c6bd8269
commit c304bc0e10
211 changed files with 60070 additions and 14 deletions
@@ -0,0 +1,22 @@
using GhostSystem;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class ReplaySceneLoader : MonoBehaviour
{
public GhostReplayManager replayManager;
private int currentScene;
public void LoadSceneAdditive(int sceneIndex)
{
if(SceneManager.loadedSceneCount > 1)
{
SceneManager.UnloadSceneAsync(currentScene);
}
SceneManager.LoadSceneAsync(sceneIndex, LoadSceneMode.Additive);
currentScene = sceneIndex;
// replayManager.SceneId = SceneManager.GetSceneByBuildIndex(currentScene).name; wird jetzt durch Event der Szene gelöst
}
}