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