A question about unity ecs singleton object
Closed this issue · 1 comments
ffbh123456 commented
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 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.
ArturoNereu commented
Hello, sorry for a long time to respond. In Entities 1.0 there's a solution for what you asked: https://docs.unity3d.com/Packages/com.unity.entities@1.0/manual/components-singleton.html