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

28 lines
840 B
C#

using System;
using UnityEngine;
using UnityEngine.VFX;
namespace UnityEditor.VFX
{
//Helper to isolate all class which are skipping first level of hierarchy (sealed function are important at this stage)
class VFXSlotEncapsulated : VFXSlot
{
protected override sealed VFXExpression ExpressionFromChildren(VFXExpression[] expr)
{
if (expr.Length != 1)
throw new InvalidOperationException("Incorrect VFXSlotPImpl");
return ApplyPatchExpression(expr[0]);
}
protected override sealed VFXExpression[] ExpressionToChildren(VFXExpression expr)
{
return new VFXExpression[1] { expr };
}
virtual protected VFXExpression ApplyPatchExpression(VFXExpression expression)
{
return expression;
}
}
}