protobuf-unity icon indicating copy to clipboard operation
protobuf-unity copied to clipboard

A unity question about ecs singleton

Open ffbh123456 opened this issue 4 years ago • 0 comments

I want to store some prefabs in ECS world for the component system use, and I create a struct extend the IComponentData store the GameObject and using SetSingleton<T> when a system initializes, but the unity prompt that I can only use primitive or blittable type. How could I solve it or could you give me some solution to store singleton CSharp reference type in ECS world for the component system use.

ffbh123456 avatar Jul 22 '20 03:07 ffbh123456