Set Sprite Mask Is Custom Range Active#
Miscellaneous / Sprite Mask / Set Sprite Mask Is Custom Range Active
Description#
Sets the Is Custom Range Active property of Sprite Mask component
Parameters#
| Name | Description |
|---|---|
| Sprite Mask | |
| Value |
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
namespace VisualScript.Runtime
{
[Title("Set Sprite Mask Is Custom Range Active")]
[Category("Miscellaneous/Sprite Mask/Is Custom Range Active")]
[Description("Sets the Is Custom Range Active property of Sprite Mask component")]
[Image(typeof(IconSprite), ColorTheme.Type.Purple, typeof(BadgeMinus))]
[Parameter("Sprite Mask")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_SpriteMask_SetIsCustomRangeActive : Instruction
{
[SerializeField] private GetGameObject m_SpriteMask = new GetGameObject(
new GenTypeGameObject_SpriteMask()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Is Custom Range Active");
return $"{this.m_SpriteMask} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
SpriteMask component = this.m_SpriteMask.Get<SpriteMask>(args);
if (component == null) return Done;
component.isCustomRangeActive = (bool) this.m_Value.Get(args);
return Done;
}
}
}