Occlusion Portal Open#
Rendering / Occlusion Portal / Occlusion Portal Open
Description#
Compares the Open property of Occlusion Portal component to another value
Parameters#
| Name | Description |
|---|---|
| Occlusion Portal |
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.Rendering;
namespace VisualScript.Runtime
{
[Title("Occlusion Portal Open")]
[Category("Rendering/Occlusion Portal/Open")]
[Description("Compares the Open property of Occlusion Portal component to another value")]
[Image(typeof(IconOcclusionPortal), ColorTheme.Type.Teal)]
[Parameter("Occlusion Portal")]
[Serializable]
public class GenConditionBool_OcclusionPortal_CheckOpen : Condition
{
[SerializeField] private GetGameObject m_OcclusionPortal = new GetGameObject(
new GenTypeGameObject_OcclusionPortal()
);
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Open");
return $"{this.m_OcclusionPortal} {member}";
}
protected override bool Run(Args args)
{
OcclusionPortal component = this.m_OcclusionPortal.Get<OcclusionPortal>(args);
if (component == null) return false;
return component.open;
}
}
}