This is a "stack" that supports editor serialization.
It's really just a list with an API that looks like a stack.
It's comparably quick, for most cases it will be slightly faster to push to this than a stack, but slightly slower to pop than an actual stack.
NOTE: If you want to use this you need to define your own class and inherit from this, as Unity does not support serialization of generic types
DustProductions.Core (in DustProductions.Core.dll) Version: 18.104.22.168 (22.214.171.124)
public class SerializableStack<T>
- The type of the items in the stack
The SerializableStackT type exposes the following members.
Number of items in the stack
Clears out the stack
Look at the top item of the stack, but keep it in the stack
Remove the top object from the stack and return it
Add an object to the top of the stack