What’s the right data type to use to store an array/hashtable/struct of gameobject cube instances “blocks”? Along with the usual cube properties, the block instances also have their own properties, such as tileType
. The purpose of this variable would be to undo/redo…
I’m currently using GameObject, but it may make more sense to just store this as text rather than GameObject’s, and then have the system create the cubes when the redo/undo is hit (etc). For undo’s, I am having the last cube “popped” off the GameObject array.
For redo, I’m having the issue here, where populating a redo array seems to keep the Destroy from removing the block.
I suppose it would make more sense to use a struct or something like that? If so, how would you define it?