Array2DEditor
Array2DEditor copied to clipboard
Grid broken when making new type
I'd love to get some help on this! Pretty new to Unity, how do I get this to form in a grid? Was hoping to get it to look similar to the Sprite grid, it is probably way more involved then I'm hoping
Hey Kadynsr! Thanks for using Array2DEditor :) What class exactly are you trying to render in each cell, is it a class of your own or from Unity? Anyway, in both cases, you will need to:
- Add a CellRow class for it in Array2DEditor/Scripts/CellRowTypes
- Write an Array2D class for it in Array2DEditor/Scripts/Array2DTypes/ObjectTypes
- Write a PropertyDrawer for it, in Array2DEditor/Editor/PropertyDrawers/ObjectDrawers
You can take inspiration from the other classes you will find in these folders. And if this is what you did to get the result you're showing me, then feel free to send me your code so I can take a look at what's wrong!
Hello Kadynsr, do you have any update on this? 😃
I had the same problem and following your instructions fixed it! But my problem now is that I can't find the variable to change the rows and columns, it's always set at 3x3.
Hello avicarpio, I will address this in a future version of Array2DEditor, as it's been asked for a long time. :)
Hey Kadynsr! Thanks for using Array2DEditor :) What class exactly are you trying to render in each cell, is it a class of your own or from Unity? Anyway, in both cases, you will need to:
- Add a CellRow class for it in Array2DEditor/Scripts/CellRowTypes
- Write an Array2D class for it in Array2DEditor/Scripts/Array2DTypes/ObjectTypes
- Write a PropertyDrawer for it, in Array2DEditor/Editor/PropertyDrawers/ObjectDrawers
You can take inspiration from the other classes you will find in these folders. And if this is what you did to get the result you're showing me, then feel free to send me your code so I can take a look at what's wrong!
Hi Eldoir, really great tool to have. But i am having trouble creating a grid for a custom class. Could you please write a bit of reference code for say a (class with 1 char and 2 bools) in a grid formation. Thanks for the help!
Hi @AJAdityaJain, thanks for your comment! In fact, I'm also having trouble creating a grid for a custom class. This issue has been raised a few days ago actually: https://github.com/Eldoir/Array2DEditor/issues/16. I think I... simply never tried with a custom serializable class, only simple cases with basic/Unity types. I'm actively working on this since it's a quite limiting issue. I'll keep you posted!