maint: add demo world loader
This commit is contained in:
22
Assets/Scripts/World/DemoWorldLoader.cs
Normal file
22
Assets/Scripts/World/DemoWorldLoader.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class DemoWorldLoader : MonoBehaviour{
|
||||
public List<string> scenesName;
|
||||
|
||||
void Start()
|
||||
{
|
||||
foreach (string thisScene in scenesName) {
|
||||
if (!SceneManager.GetSceneByName(thisScene).isLoaded) {
|
||||
SceneManager.LoadScene(thisScene, LoadSceneMode.Additive);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user