Selectionコマンドでスキップを解除するのは、
Selectionコマンド実行時に下記のプログラム(
StopSkipInSelection )を呼び出しているからです。
public override void DoCommand(AdvEngine engine)
{
engine.Config.StopSkipInSelection();
}
StopSkipInSelectionは、内部で
Configの 「Is Stop Skip In Selection」をチェックして、それがtrueであればスキップを解除します。
public void StopSkipInSelection()
{
if (IsStopSkipInSelection && isSkip)
{
isSkip = false;
}
}
なので、WaitCustomコマンド実行時に、これを呼び出すようにすればいいです。
独自のプログラムを呼び出すには、色々な方法があります。
今回のように、既存のコマンド実行時に統一してなにか処理を追加したいのであれば、
Adv Scenario Playerの「On Begin Command」イベントを使用するとよいかと思います。
以下、サンプルです。
using UnityEngine;
using UtageExtensions;
using Utage;
public class SampleCommandEvent : MonoBehaviour
{
public AdvEngine Engine => this.GetAdvEngineCacheFindIfMissing(ref engine);
[SerializeField]
protected AdvEngine engine;
void Awake()
{
Engine.ScenarioPlayer.OnBeginCommand.AddListener(OnBeginCommand);
}
void OnBeginCommand(AdvCommand command)
{
if (command.Id == AdvCommandParser.IdWaitCustom)
{
Engine.Config.StopSkipInSelection();
}
}
}