Visual Effect Culled#
Effects / Visual Effect / Visual Effect Culled
Can Read
Cannot Write
Description#
The Culled property of the Visual Effect 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;
using UnityEngine.VFX;
namespace VisualScript.Runtime
{
[Get]
[Title("Visual Effect Culled")]
[Category("Effects/Visual Effect/Culled")]
[Description("The Culled property of the Visual Effect component")]
[Image(typeof(IconVisualEffect), ColorTheme.Type.Yellow)]
[Keywords("Effect")]
[Serializable]
public class GenTypeBool_VisualEffect_Culled : TypeBool
{
[SerializeField] private GetGameObject m_VisualEffect = new GetGameObject(
new GenTypeGameObject_VisualEffect()
);
public override bool GetPreview(GameObject source)
{
GameObject instance = this.m_VisualEffect.GetPreview(source);
if (instance == null) return default;
VisualEffect component = instance.GetComponent<VisualEffect>();
return component != null ? component.culled : default;
}
public override bool Get(Args args)
{
VisualEffect instance = this.m_VisualEffect.Get<VisualEffect>(args);
return instance != null
? instance.culled
: default;
}
public override string ToString()
{
return $"{this.m_VisualEffect} Culled";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}