[Property Drawer] Serializable 2D Array and Visualizer | Data Tables | 2D Array
shironokun
$5.99
(no ratings)
Date |
Price |
---|---|
日期和时间 |
价钱($) |
11/14(2024) |
5.99 |
11/15(2024) |
5.99 |
Jump AssetStore
It is a property drawer you can serialize a 2D array. You can use Array2D<T> to define generics type 2D Array.Sometimes we want to store a 2D Array for our Game development, for Level design, Procedural Dungeon etc.However C# 2D Array T[,] is not a serializable type and if you are using a long long list for alternative it is very hard to manage a long list. So this package is for helping you serialize and manage a 2D Array for your game project.Key Feature:1. Serializable class Array2D with 2D Array Visualizer2. T can be everything, it is Generics type.Non Generic types like int, float, string, enum, Color, Object References etc. is possible to be visualized directly.Generic Type, usually is a custom Classes, will only show the Coord of data in the Table GUI. For editing, you are able to select and edit a single data, the selected object will be serialize below the "Selected Object"(More Detail about Type: Unity - Scripting API: SerializedPropertyType)3. 2D Array Resizing by width and height4. Visualize direction, optional visualize "From Bottom To Top" or "From Top To Bottom".5. Offset and Range is available, if you are managing a huge 2D Array, you will be able to setup an offset and range to only visualize a part of the array.6a. If defined T is Not Generic Type, Drag and Drop Fill Mode is available for you to edit multiple columns at the same time.6b. If defined T is a Generic Type, Select and Edit is available for you to edit custom objects one by one.Be careful:* Serializing a huge Array is technically possible but not recommended. One of the reasons is that serializing data will take up your disk space, so if you have a 2D Array size above 10^8 it will take a very long time to load. (You are still able to create a huge size 2D Array in code, just do not serialize that is fine)* Array2D is a data structure, it is not equal to C# 2D Array [,], you are able create a Array2D from [,] by constructor Array2D([,])public T this[int x, int y]Access the value by indexer (x, y)public void InitSize(int width, int height)Init a empty Array with width and height sizepublic void Resize(int width, int height)Resize a 2D Array and keep its variable as possible.It is IEnumerable so you can use foreach