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

36 lines
1.3 KiB
C#

using System.Collections.Generic;
namespace UnityEditor.VFX
{
class VFXStripTopologyProvider : VariantProvider
{
public override IEnumerable<Variant> GetVariants()
{
yield return new VFXComposedParticleOutputVariant(
"Output ParticleStrip".AppendLabel("ShaderGraph").AppendLabel("Quad"),
VFXLibraryStringHelper.Separator("Output Strip", 3),
typeof(VFXComposedParticleStripOutput),
() => new ParticleTopologyQuadStrip());
}
}
[VFXInfo(variantProvider = typeof(VFXStripTopologyProvider), synonyms = new []{ "Trail", "Ribbon" })]
sealed class VFXComposedParticleStripOutput : VFXAbstractComposedParticleOutput
{
VFXComposedParticleStripOutput() : base(true) { }
internal override void GenerateErrors(VFXErrorReporter report)
{
base.GenerateErrors(report);
foreach (var attributeInfo in GetAttributesInfos())
{
if (attributeInfo.mode.HasFlag(VFXAttributeMode.Write) && attributeInfo.attrib.Equals(VFXAttribute.Position))
{
report.RegisterError("WritePositionInStrip", VFXErrorType.Warning, VFXQuadStripOutput.WriteToPositionMessage, this);
break;
}
}
}
}
}