Remove struct layout stuff
It broke everything using the type
This commit is contained in:
parent
3eef859095
commit
6fedf90380
2 changed files with 5 additions and 7 deletions
|
@ -1,5 +1,4 @@
|
|||
using Svelto.ECS;
|
||||
using TechbloxModdingAPI.Blocks;
|
||||
|
||||
namespace TechbloxModdingAPI.Utility
|
||||
{
|
||||
|
|
|
@ -5,14 +5,13 @@ using Svelto.ECS;
|
|||
|
||||
namespace TechbloxModdingAPI.Utility
|
||||
{
|
||||
[StructLayout(LayoutKind.Explicit)] //Make the array and managedArray fields take up the same space
|
||||
public ref struct OptionalRef<T> where T : struct, IEntityComponent
|
||||
{
|
||||
[FieldOffset(0)] private readonly State state;
|
||||
[FieldOffset(1)] private readonly uint index;
|
||||
[FieldOffset(5)] private NB<T> array;
|
||||
[FieldOffset(5)] private MB<T> managedArray;
|
||||
[FieldOffset(1)] private readonly EntityInitializer initializer;
|
||||
private readonly State state;
|
||||
private readonly uint index;
|
||||
private NB<T> array;
|
||||
private MB<T> managedArray;
|
||||
private readonly EntityInitializer initializer;
|
||||
//The possible fields are: (index && (array || managedArray)) || initializer
|
||||
|
||||
public OptionalRef(NB<T> array, uint index)
|
||||
|
|
Loading…
Reference in a new issue