Post by hessex on Dec 25, 2021 17:51:53 GMT
Hello, I am enjoying this software but am unsure how to solve a particular challenge.
I would like to pull in data from a scriptable object (SO) and use that data in 3 different scrollers (3 different cell views) from one controller script. I understand how to accomplish the former (set data from SO), but have not been able to determine the best method of completing the latter.
A model of what I am trying to accomplish is as follows:
Demo - 02 Multiple Cell Types demonstrates multiple cell views in one scroller, and Demo - 03 Selection Demo demonstrates multiple scrollers with same data, but I have not been able to successfully apply these solutions to my scenario. I am simply not sure where/when the data is being applied to the correct cell view, and I am getting errors resulting from the "GetCellView" function.
Is my desired approach feasible, or should I consider multiple controllers?
Thank you in advance for your response
Edit: I do have distinct CellViews and Data files for each type of view.
I would like to pull in data from a scriptable object (SO) and use that data in 3 different scrollers (3 different cell views) from one controller script. I understand how to accomplish the former (set data from SO), but have not been able to determine the best method of completing the latter.
A model of what I am trying to accomplish is as follows:
- Scene Characters have common attributes in a SO (thumbnail, name, level, hit points, initiative score, list of abilities, etc.).
- I am passing a list of Scene Characters at Start(), and using the attached SO to generate the following 3 scrollers:
- Player Characters should appear in a "Player Character Scroller" with ALL of these attributes displayed
- Non-Player Characters should appear in a "Non-Player Character Scroller" with SOME of these attributes displayed (thumbnail, name, level, hit points)
- All Characters will appear in a "Character Turn Scroller" ordered by initiative score (SO attribute), with MINIMAL attributes displayed (thumbnail and name)
Demo - 02 Multiple Cell Types demonstrates multiple cell views in one scroller, and Demo - 03 Selection Demo demonstrates multiple scrollers with same data, but I have not been able to successfully apply these solutions to my scenario. I am simply not sure where/when the data is being applied to the correct cell view, and I am getting errors resulting from the "GetCellView" function.
Is my desired approach feasible, or should I consider multiple controllers?
Thank you in advance for your response
Edit: I do have distinct CellViews and Data files for each type of view.