Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Custom BlobAssetReference Serialization

Discussion in 'Entity Component System' started by felipin, Nov 1, 2019.

  1. felipin

    felipin

    Joined:
    Nov 18, 2015
    Posts:
    49
    I'd like to know if BlobAssetReference will support custom serialization, for example, assume a struct like this:
    upload_2019-11-1_14-25-14.png
    I don't wanna store it on disk using this layout—but at runtime this is a better performance approach—but a scale/rotation/position layout where I can save disk space, if the animation have no scale transformation every bone transformation can take up only 28B(float3, quaternion) of disk space instead of 64B (float4x4). my question is: Will DOTS support any custom serialization method?

    I'm aware that I can create a custom serialization using StreamBinaryReader/StreamBinaryWriter but I have to load the data manually that requires file reference that's a little bit hard to get it as Streaming Assets don't have metadata.

    Bonus Question: for the time being, we have a GameObject conversion workflow, will be there a Assets conversion workflow (e.g. convert AnimatorController to BlobAssetReference<DOTSAnimatorController>)?
     
    Last edited: Nov 1, 2019
    MNNoxMortem and JesOb like this.