mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-23 00:28:23 -05:00
22 lines
527 B
C#
22 lines
527 B
C#
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
using UnityEngine.Serialization;
|
|
|
|
namespace UnityAtoms.SceneMgmt
|
|
{
|
|
[UseIcon("atom-icon-purple")]
|
|
[CreateAssetMenu(menuName = "Unity Atoms/Actions/Scene Management/Change Scene")]
|
|
public sealed class ChangeScene : VoidAction
|
|
{
|
|
[FormerlySerializedAs("SceneName")]
|
|
[SerializeField]
|
|
private StringReference _sceneName;
|
|
|
|
public override void Do()
|
|
{
|
|
SceneManager.LoadScene(_sceneName.Value);
|
|
}
|
|
}
|
|
}
|
|
|