- Home /
Is it possible to have an entity component which behaves as a Stack?
I would like to have a component on an Entity in my game which works as a Stack, with a pop/push call, such that I might be able to use it as a per-entity finite state machine.
From what I've learned, data types available for use with entity components is limited to those which are blittable. Does this mean that a stack would have to be implemented from scratch using fixed arrays and custom logic?
Edit: I've realized I'm able to declare a new Stack() in the ComponentSystem. Is this the intended pattern? This stack is still allocated on the heap, right? Do I need to manage it or anything?
Your answer
Follow this Question
Related Questions
2D Animation does not start 1 Answer
How do I assign a public variable inside a JobComponentSystem(ECS)? 1 Answer
Is it possible to use a "hybrid" of BOTH Hybrid and Pure ECS? 0 Answers
How can I get a component data from an entity inside a JobComponentSystem? 1 Answer
declaring unknown script components under a empty variable 0 Answers