コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

2023-02-23から1日間の記事一覧

【Unity】System.InvalidOperationException: Jobs can only create Temp memory

概要 public struct Example : IJob { void IJob.Execute() { var list = new NativeList<int>( Allocator.Persistent ); } } 上記のように IJob.Execute の中で Allocator.Persistent を指定して NativeList を生成したら System.InvalidOperationException: Job</int>…

【Unity】(0,0): Burst error BC1045: Struct `XXXX&` with auto layout is not supported

概要 (0,0): Burst error BC1045: Struct `XXXX&` with auto layout is not supported IJob インターフェイスを実装する構造体を定義した際に 上記のエラーが発生する現象に遭遇した public (int, int) value { get; set; } 上記のように ValueTuple を使用…