ArturoNereu/ECS_101

A question about unity ecs singleton object

Closed this issue · 1 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 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.

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