Skip to content

Instantly share code, notes, and snippets.

@todorok1
Last active August 20, 2025 07:53
Show Gist options
  • Select an option

  • Save todorok1/92a3020f55584822e12cb1e05042afeb to your computer and use it in GitHub Desktop.

Select an option

Save todorok1/92a3020f55584822e12cb1e05042afeb to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第122回 シーンを遷移させるイベントを処理するクラス
using UnityEngine;
using UnityEngine.SceneManagement;
namespace SimpleRpg
{
/// <summary>
/// シーンを遷移させるイベントを処理するクラスです。
/// </summary>
public class EventProcessSwitchScene : EventProcessBase
{
/// <summary>
/// 遷移先のシーン名です。
/// </summary>
[SerializeField]
string _targetScene = "Title";
/// <summary>
/// イベントの処理を実行します。
/// </summary>
public override void Execute()
{
SceneManager.LoadScene(_targetScene);
CallNextProcess();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment