#Retrieving previous tick data for ghost fields

1 messages · Page 1 of 1 (latest)

native shale
#

Does the snapshot index only increment when you have received all data for a specific tick? And, if so, how do you retrieve data from previous ticks? I see documentation in the 0.50 version for retrieving it, but not in the 1.0.0 version.

grizzled storm
#

No snapshot index increment every time you receive data for that specific ghost.
We don't expose a public method to retrieve data from the buffer for a certain tick. We have methods but are internals. The data is stored inside the SnapshotData dynamic buffer. Decoding requires some non trivial code, because it does not contains "component data" as is but their internal serialised representation.

#

You can check the GetDataAtTick extension method what is doing, or just make it public.
Or just iterate through the buffer entities, starting from the LatestIndex backward (wrapping) and retrieving the NetworkTick from the first 4 bytes of the buffer.

#

Why do you need to access old frames? Do you have specific needs?

native shale
#

I had a dynamic buffer ghost field and I believe I was trying to find the deltas between ticks so that I could update the visuals for only the changed values.