You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
741 B
26 lines
741 B
using System;
|
|
using UnityEngine;
|
|
using UnityEngine.VFX;
|
|
|
|
namespace UnityEditor.VFX
|
|
{
|
|
[VFXInfo(type = typeof(Vector))]
|
|
class VFXSlotVector : VFXSlotEncapsulated
|
|
{
|
|
sealed protected override bool CanConvertFrom(Type type)
|
|
{
|
|
return base.CanConvertFrom(type)
|
|
|| VFXSlotFloat3.CanConvertFromVector3(type);
|
|
}
|
|
|
|
sealed protected override VFXExpression ConvertExpression(VFXExpression expression, VFXSlot sourceSlot)
|
|
{
|
|
return VFXSlotFloat3.ConvertExpressionToVector3(expression);
|
|
}
|
|
|
|
sealed public override VFXValue DefaultExpression(VFXValue.Mode mode)
|
|
{
|
|
return new VFXValue<Vector3>(Vector3.zero, mode);
|
|
}
|
|
}
|
|
}
|