Reflection Probe Baked Texture#
Rendering / Reflection Probe / Reflection Probe Baked Texture
Can Read
Can Write
Description#
The Baked 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]
[Set]
[Title("Reflection Probe Baked Texture")]
[Category("Rendering/Reflection Probe/Baked Texture")]
[Description("The Baked Texture property of the Reflection Probe component")]
[Image(typeof(IconReflectionProbe), ColorTheme.Type.Blue)]
[Serializable]
public class GenTypeTexture_ReflectionProbe_BakedTexture : 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.bakedTexture : default;
}
public override Texture Get(Args args)
{
ReflectionProbe instance = this.m_ReflectionProbe.Get<ReflectionProbe>(args);
return instance != null
? instance.bakedTexture
: default;
}
public override void Set(Texture value, Args args)
{
ReflectionProbe component = this.m_ReflectionProbe.Get<ReflectionProbe>(args);
if (component != null) component.bakedTexture = (Texture) value;
}
public override string ToString()
{
return $"{this.m_ReflectionProbe} Baked Texture";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}