Files
CartoonRPG/Library/PackageCache/com.unity.visualeffectgraph@2973a8ac1070/Editor/Models/Slots/Implementations/VFXSlotTextureCube.cs
Caleb Sandford deQuincey 02c4b5ab66 Adding in new packages
2025-06-05 22:59:18 +01:00

25 lines
823 B
C#

using System;
using UnityEngine;
using UnityEngine.VFX;
using UnityEngine.Rendering;
namespace UnityEditor.VFX
{
[VFXInfo(type = typeof(Cubemap))]
class VFXSlotTextureCube : VFXSlotObject
{
internal override void GenerateErrors(VFXErrorReporter report)
{
if (value is Texture texture && texture.dimension != TextureDimension.Cube)
report.RegisterError("Slot_Value_Incorrect_TextureCube", VFXErrorType.Error, $"The selected texture {(string.IsNullOrEmpty(this.property.name) ? "" : $"'{this.property.name}' ")}is not a Cubemap texture", this.owner as VFXModel);
base.GenerateErrors(report);
}
public override VFXValue DefaultExpression(VFXValue.Mode mode)
{
return new VFXTextureCubeValue(0, mode);
}
}
}