IndieGame/client/Assets/ParadoxNotion/NodeCanvas/Tasks/Actions/Application/LoadScene.cs

25 lines
602 B
C#
Raw Permalink Normal View History

2024-10-11 10:12:15 +08:00
using NodeCanvas.Framework;
using ParadoxNotion.Design;
using UnityEngine.SceneManagement;
namespace NodeCanvas.Tasks.Actions
{
[Category("Application")]
public class LoadScene : ActionTask
{
[RequiredField]
public BBParameter<string> sceneName;
public BBParameter<LoadSceneMode> mode;
protected override string info {
get { return string.Format("Load Scene {0}", sceneName); }
}
protected override void OnExecute() {
SceneManager.LoadScene(sceneName.value, mode.value);
EndAction();
}
}
}