Allow serialization of all generic types in scripts

This commit is contained in:
Simon Lübeß
2026-10-24 13:36:36 +02:00
parent ed94213435
commit 2674836cca
10 changed files with 262 additions and 33 deletions
@@ -0,0 +1,28 @@
using GlitchyEngine;
using GlitchyEngine.Math;
using System;
using System.Collections.Generic;
using System.Text;
namespace TestProject.Assets.Scripts;
public class SimpleGenericClass<T>
{
public T MyField;
}
public struct SimpleGenericStruct<T>
{
public T MyField;
}
public class AdvancedSerializationTest : Entity
{
public (int Prim, float2 Struc, BClass Ref) LeTuple;
public List<(int Prim, float2 Struc, BClass Ref)> LeListDeTuple;
public SimpleGenericStruct<float> GenericStructField = new SimpleGenericStruct<float>();
public SimpleGenericClass<double> GenericClassField = new SimpleGenericClass<double>();
}
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 16179505410974622627
}
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 13036819508142753970
}
@@ -0,0 +1,11 @@
{
AssetLoader = null,
Config = null,
Importer = null,
ImporterConfig = null,
Processor = null,
ProcessorConfig = null,
Exporter = null,
ExporterConfig = null,
AssetHandle = 2840305762073418465
}