#Loading Entity Scene failed because the entity header file couldn't be resolved.

1 messages · Page 1 of 1 (latest)

hot eagle
#

Is there any way to have pointers on IComponentData struct?

It keeps throwing this error when i add pointers

ps: It is only useful for runtime. Can i bake it if it is null at baking stage?

Why does BlobAssetReference can be baked if it has a pointer too?

mossy kestrel
#

You can't bake pointers

#

It'll just be pointing to something random on load

#

Blob assets store all their memory in a big chunk and then store offsets of the pointer to the chunk

oblique heart
#

You can serialize pointer types in components if you mark the component with the [ChunkSerializable] attribute. However, those pointers are written as is at serialization time and no fixup will be done. So like Tertle mentions, that pointer will be meaningless come deserialization time. But if you just want a component serialized that can have a ptr for your special use case, you can use the above attribute. (You could also work around this issue by using a different type such as ulong and later cast it to a pointer)