ayrat
New Member
Posts: 2
|
Post by ayrat on Feb 12, 2021 4:53:30 GMT
Hi, I looked through the provided demos both for simulating a grid system and for multiple cell types. But failed to combine them.
I have a grid with 3 columns, so I need to add an additional row at the beginig of this grid to be a header and another one at the end of the grid to serve as a footer.
Can you please help me with this
|
|
|
Post by echo17 on Feb 12, 2021 14:36:05 GMT
I was going to suggest combining the multiple cell demo with the grid demo, but I guess you already tried this So basically, you are going to have a different cell type for the header than you do for the grid cells. This cell type will have its own prefab along with a different cellIdentifier value. This cellIdentifier makes that cell type unique. In your controller script, you will have a list of data. This data will have header data for the header cells and regular grid data for the grid cells. In the GetCellView method of your controller, you will need to choose the correct cell prefab, depending on the data type for that cell index. You can see an example of the different data types and cell prefab choosing in the MultipleCellTypesDemo.cs script inside the demo #2 folder. I hope this helps! Shoot me an email to the address in my signature if you need any clarification.
|
|
ayrat
New Member
Posts: 2
|
Post by ayrat on Feb 12, 2021 16:04:00 GMT
I made all these steps except for the changing cellIdentifiers in my prefabs. Now that I've changed them it works perfectly!
Thanks so much for your help.
|
|
|
Post by echo17 on Feb 13, 2021 11:06:14 GMT
Great, thanks for the update!
|
|