With a Utage scenario, you do a SendMessage to the Unity object with the specified name.
Can be used even more easily than the SendMessage command.



Command Description Arg1 Arg2 Arg3 Arg4 Arg5 Arg6
SendMessageByName SendMessage to the GameObject with the specified name GameObject name Optional argument Optional argument Optional argument Optional argument Optional argument

Sample for Receiving a SendMessageByName

Create an object with the name specified in Arg1 on Unity, and then write a component for receiving messages.

The contents of the cells entered in Excel, such as those from Arg2 to Text, can be obtained with command.ParseCellOptional<>, allowing you to pass arguments in a flexible way.

using UnityEngine;
using Utage;
using System.Collections;

/// <summary>
/// ADV用SendMessageByNameコマンドから送られたメッセージを受け取る処理のサンプル
/// </summary>
public class SampleSendMessageByName : MonoBehaviour
    void Test(AdvCommandSendMessageByName command)

    void TestArg(AdvCommandSendMessageByName command)
        Debug.Log(command.ParseCellOptional<string>(AdvColumnName.Arg3, "arg3"));


    void TestWait(AdvCommandSendMessageByName command)

    IEnumerator CoWait(AdvCommandSendMessageByName command)
        command.IsWait = true;

        float time = command.ParseCellOptional<float>(AdvColumnName.Arg3, 0);
        while (true)
            time -= Time.deltaTime;
            if (time <= 0) break;
            yield return 0;
        command.IsWait = false;