Sprite Mask#
Components / Miscellaneous / Sprite Mask
Can Read
Cannot Write
Description#
A direct reference to a Sprite Mask component
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
{
[Get]
[Inline(nameof(m_Value), typeof(SpriteMask), true)]
[Title("Sprite Mask")]
[Category("Components/Miscellaneous/Sprite Mask")]
[Description("A direct reference to a Sprite Mask component")]
[Image(typeof(IconSprite), ColorTheme.Type.Purple, typeof(BadgeMinus))]
[Serializable]
public class GenTypeGameObject_SpriteMask : TypeGameObject
{
[SerializeField] private SpriteMask m_Value;
public override GameObject GetPreview(GameObject source)
{{
return this.m_Value != null
? this.m_Value.gameObject
: null;
}}
public GenTypeGameObject_SpriteMask()
{ }
public GenTypeGameObject_SpriteMask(SpriteMask component)
{
this.m_Value = component;
}
public override GameObject Get(Args args)
{
return this.m_Value != null
? this.m_Value.gameObject
: null;
}
public override U Get<U>(Args args)
{
if (typeof(U) == typeof(SpriteMask))
{
return this.m_Value != null
? this.m_Value as U
: null;
}
return base.Get<U>(args);
}
public override string ToString()
{
return TextUtils.Name(this.m_Value);
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnEditorChange;
}
}