EndScenario


Sets the end position of a scenario.
In Utage, when the execution gets to the very end of a scenario sheet, it basically treats it as the end of the scenario.
However, if it is being used as a conversation section within an existing game, you could have written multiple conversation scenes within the same sheet, so this command is available to mark the end of a scenario.

Sample

Reference

Command Description Arg1 Arg2 Arg3 Arg4 Arg5 Arg6
EndScenario Stops the scenario and terminates it

Control the Start and End of Utage Scenarios from a Unity Program

If you are using Utage for conversation sections in games, etc., you are likely to need to call a specific Utage scenario and wait for it to finish.
To call a scenario, use JumpScenario.
To determine if it is the end of a scenario, use IsEndScenario.

Sample code:

using UnityEngine;
using System.Collections;
using Utage;
public class TalkArea : MonoBehaviour {

    public AdvEngine engine;
    public string scenarioLabel;

    // コリジョンにぶつかった
    void OnCollisionEnter()
    {
        StartCoroutine( CoTalk() );
    }

    IEnumerator CoTalk()
    {
        //「宴」のシナリオを呼び出す
        engine.JumpScenario( scenarioLabel );

        //「宴」のシナリオ終了待ち
        while(!engine.IsEndScenario)
        {
            yield return 0;
        }
    }
}