-
-
Save todorok1/92a3020f55584822e12cb1e05042afeb to your computer and use it in GitHub Desktop.
シンプルRPGチュートリアル第122回 シーンを遷移させるイベントを処理するクラス
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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