So, I need a lot of prefab reference from bansheegz BGDatabse as my screenshot
I have tried the prefab baking from authoring itself and works fine, but it doesnt work for database
When I used Buffer for the reference, it works on Editor, but crash after splash unity screen on android Build
// authoring
public GameObject dropItemsPrefab => DB_Prefab_ECS.GetEntity(0).Fieldprefabse;
// IBufferElementData
public struct DropItemsBuffer : IBufferElementData
{
public Entity prefab;
}
When I used the prefab reference, it getting error, can't convert to Hash128
// result error
// cannot convert from 'UnityEngine.GameObject' to 'Unity.Entities.Hash128'
EntityPrefabReference prefabReference = new EntityPrefabReference(DB_Prefab_ECS.GetEntity(0).Fieldprefabse);
I assume that the Bake started before the Database load and causing the crash? and its getting null?
Any Ideas to reference/bake the prefab from database?