Demote Unity config MessagePack metadata

This commit is contained in:
Meta Vens 2026-06-13 11:14:38 +01:00
commit 64e596d92d
10 changed files with 84 additions and 106 deletions

View file

@ -5,35 +5,34 @@
using System;
using System.Collections;
using System.Collections.Generic;
using MessagePack;
using Unity.Mathematics;
using static Unity.Mathematics.math;
[Serializable, MessagePackObject]
[Serializable]
public class ExponentialCurve
{
[Key(0), Inspectable]
[Inspectable]
public float Exponent;
[Key(1), Inspectable]
[Inspectable]
public float Multiplier;
[Key(2), Inspectable]
[Inspectable]
public float Constant;
public float Evaluate(float value) => Multiplier * pow(value, Exponent) + Constant;
}
[Serializable, MessagePackObject]
[Serializable]
public class ExponentialLerp
{
[Key(0), Inspectable]
[Inspectable]
public float Exponent;
[Key(1), Inspectable]
[Inspectable]
public float Minimum;
[Key(2), Inspectable]
[Inspectable]
public float Maximum;
public float Evaluate(float value) => Minimum + pow(saturate(value), Exponent) * (Maximum - Minimum);