Reflection Probe Texture#
Rendering / Reflection Probe / Reflection Probe Texture
Can Read
Cannot Write
Description#
The Texture property of the Reflection Probe 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.Rendering;
namespace VisualScript.Runtime
{
[Get]
[Title("Reflection Probe Texture")]
[Category("Rendering/Reflection Probe/Texture")]
[Description("The Texture property of the Reflection Probe component")]
[Image(typeof(IconReflectionProbe), ColorTheme.Type.Blue)]
[Serializable]
public class GenTypeTexture_ReflectionProbe_Texture : TypeTexture
{
[SerializeField] private GetGameObject m_ReflectionProbe = new GetGameObject(
new GenTypeGameObject_ReflectionProbe()
);
public override Texture GetPreview(GameObject source)
{
GameObject instance = this.m_ReflectionProbe.GetPreview(source);
if (instance == null) return default;
ReflectionProbe component = instance.GetComponent<ReflectionProbe>();
return component != null ? component.texture : default;
}
public override Texture Get(Args args)
{
ReflectionProbe instance = this.m_ReflectionProbe.Get<ReflectionProbe>(args);
return instance != null
? instance.texture
: default;
}
public override string ToString()
{
return $"{this.m_ReflectionProbe} Texture";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}