Click or drag to resize

SerializableStackT Class

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
Inheritance Hierarchy
SystemObject
  DustProductions.CoreSerializableStackT
    DustProductions.CoreSerializableCursorDefinitionStack
    DustProductions.CoreSerializableUnityObjectStack

Namespace:  DustProductions.Core
Assembly:  DustProductions.Core (in DustProductions.Core.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
[SerializableAttribute]
public class SerializableStack<T>

Type Parameters

T
The type of the items in the stack

The SerializableStackT type exposes the following members.

Constructors
  NameDescription
Public methodSerializableStackT
Initializes a new instance of the SerializableStackT class
Top
Properties
  NameDescription
Public propertyCount
Number of items in the stack
Top
Methods
  NameDescription
Public methodClear
Clears out the stack
Public methodPeek
Look at the top item of the stack, but keep it in the stack
Public methodPop
Remove the top object from the stack and return it
Public methodPush
Add an object to the top of the stack
Top
See Also