FieldQuery.TraverseMembers leads stackoverflow
I make a component in unity, like:
public struct CompA : IComponent
{
public float2 goalLS;
}
the float2 is Unity.Mathematics.float2:
struct float2
{
public float3 xyz{get;set;}
};
struct float3
{
public float2 xy{get;set;}
};
The type declarations using float2 and float3 does not compile in C#.
Compiler error:
Error CS0523 : Struct member 'float2.xyz' of type 'float3' causes a cycle in the struct layout
See: https://github.com/friflo/Friflo.Engine.ECS/blob/main/src/Tests/ECS/Github/Test_GitHub_56.cs
- Are you using these types in Unity?
- Does Unity compile this successful? Even Unity must not allow to compile this.
The type declarations using
float2andfloat3does not compile in C#. Compiler error:Error CS0523 : Struct member 'float2.xyz' of type 'float3' causes a cycle in the struct layoutSee: https://github.com/friflo/Friflo.Engine.ECS/blob/main/src/Tests/ECS/Github/Test_GitHub_56.cs
- Are you using these types in Unity?
- Does Unity compile this successful? Even Unity must not allow to compile this.
Yes, I am using unity. the float2 and float3 are from Unity package: Unity.Mathematics actually.