Fix scene load arguments

This commit is contained in:
2022-08-14 16:49:18 -07:00
parent fd1cfa36d5
commit e1ae7deba5
10 changed files with 30 additions and 19 deletions

View File

@@ -9,7 +9,7 @@ namespace Scampz.GameJam
private bool loaded = false;
public Transform spawnPoint;
[SerializeField]
public int scene;
private string scene;
void OnTriggerEnter(Collider collider)
{
@@ -19,7 +19,7 @@ namespace Scampz.GameJam
var player = GameObject.FindWithTag("Player");
var cc = player.GetComponent<CharacterController>();
cc.enabled = false;
GameManager.Instance.LoadScene(SceneManager.GetSceneByName(SceneNames.TempleA), LoadSceneMode.Additive);
GameManager.Instance.LoadScene(scene, LoadSceneMode.Additive);
player.transform.position = spawnPoint.position;
player.transform.rotation = spawnPoint.rotation;
cc.enabled = true;