Open bbsuuo opened 2 years ago
find way to solve
class GlobalTypeID
{
internal static int NextID()
{
//todo: this is not guaranteed to be unique, I must swap back to the increment!
return Unity.Burst.BurstRuntime.GetHashCode32
return (Interlocked.Increment(ref value.Data) - 1);
}
static GlobalTypeID()
{
value.Data = 0;
}
static readonly Unity.Burst.SharedStatic<int> value =
Unity.Burst.SharedStatic<int>.GetOrCreate<int, GlobalTypeID>();
}
and change code _id = GlobalTypeID.NextID();//Interlocked.Increment(ref _nextId.Data);
Burst error BC1042: The managed class type
System.Int32*
is not supported. Loading from a non-readonly static fieldUnity.Collections.NativeHeap
2<int,Unity.Collections.Min>._nextId` is not supported