They still do generate a lot of garbage but with boxed value pools I made the boxes reusable, it still does generate garbage through the delegate creation, gotta find a solution for them later
		
			
				
	
	
		
			13 lines
		
	
	
		
			325 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			325 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using Engine.Core;
 | 
						|
 | 
						|
namespace Engine.Systems.Tween;
 | 
						|
 | 
						|
public class Boxed<T> where T : struct
 | 
						|
{
 | 
						|
    public Event<Boxed<T>, BoxedValueChangedArguments> OnValueChanged { get; } = new();
 | 
						|
 | 
						|
    public T Value { get; set; } = default;
 | 
						|
 | 
						|
    public readonly record struct BoxedValueChangedArguments(T PreviousValue, T CurrentValue);
 | 
						|
}
 |