I have posted about it here , but decided to create a new thread for visibility.
After updating to Entities 0.0.12 preview30 i start getting an exception every time i stop the player.
Exception
InvalidOperationException: Late bound operations cannot be performed on fields with types for which Type.ContainsGenericParameters is true.
System.Reflection.MonoField.CheckGeneric () (at <23c160f925be47d7a4fd083a3a62c920>:0)
System.Reflection.MonoField.SetValue (System.Object obj, System.Object val, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) (at <23c160f925be47d7a4fd083a3a62c920>:0)
System.Reflection.FieldInfo.SetValue (System.Object obj, System.Object value) (at <23c160f925be47d7a4fd083a3a62c920>:0)
Unity.Entities.TypeManager.ClearStaticTypeLookup ()
Here is a simple code snipped that will make this exception come to life:
public struct GenericComponent<T> : IComponentData where T : struct {
public T Value;
}
Everything works fine but for this error being spammed when the World is shutdown is just annoying.
What is Unity plan on this? Will IComponentData with generics be forbidden in the future?