Search Unity

Question Snapshotting Entity state

Discussion in 'Entity Component System' started by amadare42, Jun 4, 2023.

  1. amadare42

    amadare42

    Joined:
    Mar 18, 2014
    Posts:
    1
    How can I create a snapshot of all Components values for specific Entity and the be able to resotore it later? I cannot rely on Entity having specific archetype or specific Components set or count. Also, solution should be burst-compatible.
    Is there any sane way to achieve that? Boxing is fine if that is the only way to do that.

    EDIT: Ideally, I'd like to be able to snapshot only subset of present components. For example, those that have specific interface. But again, without listing all component types in the job itself.
     
    Last edited: Jun 4, 2023