- Home /
Which Data Strucutre should I use ?
Hello!
I wrote two script one for record the other for replay, their goal is to record the movements of my character, then creates a copy that will reproduce these movements.
For this I created a dictionary storing a structure :
public struct PlayerState
{
public Vector3 position;
public float animState;
public Vector3 direction;
}
public Dictionary<int, PlayerState> states = new Dictionary<int, PlayerState>();
This allows me to store the movements of my character, but now I want to store other movements at various times.
Which data structure would be most appropriate, in which data structure I have to store my different dictionaries ? Do I need to make a dictionary table ?
Your answer
Follow this Question
Related Questions
How to store a Transform[,] grid in an ArrayList? 2 Answers
[SOLVED]How do i make this dictionary survive recompiles? 1 Answer
Unity enum map - how to make it more efficient/clean? Linear line complexity. Best practices. 1 Answer
Does Unity use hashmaps at run time for all parameters customized with string? 0 Answers