12 lines
318 B
C#
12 lines
318 B
C#
using UnityEngine;
|
|
|
|
[DisallowMultipleComponent]
|
|
public sealed class IfValueBehavior : GuardedValueNodeBehavior
|
|
{
|
|
protected override void RecomputeCore()
|
|
{
|
|
string value = (GetInputValue("If").AsBool() ? GetInputText("True") : GetInputText("False"));
|
|
SetOutputValueIfChanged("Text", BSValue.FromText(value));
|
|
}
|
|
}
|