Canvas Group Blocks Raycasts#
UI / Layout / Canvas Group / Canvas Group Blocks Raycasts
Can Read
Can Write
Description#
The Blocks Raycasts property of the Canvas Group 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.UI;
namespace VisualScript.Runtime
{
[Get]
[Set]
[Title("Canvas Group Blocks Raycasts")]
[Category("UI/Layout/Canvas Group/Blocks Raycasts")]
[Description("The Blocks Raycasts property of the Canvas Group component")]
[Image(typeof(IconCanvasGroup), ColorTheme.Type.TextLight)]
[Keywords("UI, Layout")]
[Serializable]
public class GenTypeBool_CanvasGroup_BlocksRaycasts : TypeBool
{
[SerializeField] private GetGameObject m_CanvasGroup = new GetGameObject(
new GenTypeGameObject_CanvasGroup()
);
public override bool GetPreview(GameObject source)
{
GameObject instance = this.m_CanvasGroup.GetPreview(source);
if (instance == null) return default;
CanvasGroup component = instance.GetComponent<CanvasGroup>();
return component != null ? component.blocksRaycasts : default;
}
public override bool Get(Args args)
{
CanvasGroup instance = this.m_CanvasGroup.Get<CanvasGroup>(args);
return instance != null
? instance.blocksRaycasts
: default;
}
public override void Set(bool value, Args args)
{
CanvasGroup component = this.m_CanvasGroup.Get<CanvasGroup>(args);
if (component != null) component.blocksRaycasts = (bool) value;
}
public override string ToString()
{
return $"{this.m_CanvasGroup} Blocks Raycasts";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}