概要
public struct Example : IJob { void IJob.Execute() { var list = new NativeList<int>( Allocator.Persistent ); } }
上記のように IJob.Execute
の中で Allocator.Persistent
を指定して
NativeList
を生成したら
System.InvalidOperationException: Jobs can only create Temp memory This Exception was thrown from a job compiled with Burst, which has limited exception support.
上記の例外が発生する現象に遭遇した
public struct Example : IJob { void IJob.Execute() { var list = new NativeList<int>( Allocator.Temp ); } }
Allocator.Temp
を指定したら例外が発生しなくなった