38 lines
890 B
C#
38 lines
890 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.SceneManagement;
|
||
|
|
||
|
public class SceneCutTool : MonoBehaviour
|
||
|
{
|
||
|
public bool Cut;
|
||
|
void Start()
|
||
|
{
|
||
|
SceneCut();
|
||
|
}
|
||
|
|
||
|
public void SceneCut() {
|
||
|
try
|
||
|
{
|
||
|
if (Cut)
|
||
|
{
|
||
|
SceneManager.LoadSceneAsync("Smart construction sites_underground", LoadSceneMode.Additive);
|
||
|
SceneManager.UnloadSceneAsync("Smart construction sites");
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
SceneManager.LoadSceneAsync("Smart construction sites", LoadSceneMode.Additive);
|
||
|
SceneManager.UnloadSceneAsync("Smart construction sites_underground");
|
||
|
}
|
||
|
}
|
||
|
catch { }
|
||
|
Cut = !Cut;
|
||
|
CameraActiveTool.CameraActiveEvent = null;
|
||
|
}
|
||
|
|
||
|
void Update()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
}
|