#Support for UntypedWeakReferenceId in Blobs

1 messages · Page 1 of 1 (latest)

flat harness
#

Recently updated to 1.0.14 and decided to start porting some of the stuff currently using Addressables to use the new Content Management APIs but instantly hit a roadblock:
Blob assets don't support UntypedWeakReferenceIds.

When can I expect this to be supported (roughly) and is there any decent workaround that could be utilized instead?

My initial plan was to port a sort of "weapon skin" table. Where a specific type of weapon has a blob asset containing references to the different materials that can be used for different weapon skins. But that's not supported so my current workaround idea would be to just use DynamicBuffers instead, however this is an issue because it doesn't de-duplicate.
Using this for weapon skins is fine but using a similar workaround for other types of Entities will be problematic as we have thousands of them. Does anyone have any other workaround ideas?

wheat dust
flat harness
#

Yeah you are maybe right actually. They are 48bytes according to UnsafeUtility.SizeOf. Was expecting ~2000 entities each having 50 references each but that's just under 5MB which is perfectly acceptable

wheat dust
#

blob asset reference potentially has more

#

😅

#

and if you are still looking to reduce memory overhead here

#

you can store it on separate entity

#

and reference it instead

#

so it's just 8 bytes

flat harness
#

Yeah storing it on a separate entity is a pretty good idea actually. That does make a nice workaround without inducing any real performance concerns as looking in to this table will be a rare occurence.

shut cargo
#

Is using a sharedcomponent for this bad?

wheat dust
#

but not just naive one

#

but copying what Unity does with RenderMeshArray

#

as in: having 1 shared comp value per subscene, and just 1 int (or short) as normal component on entity, that references index in that shared