Custom RecipePanel

dancinggoat23

New member
Hi

I'm working on a custom crafting menu, and want to display an 'attribute requirement' field on any recipe that has such. To do so, I'm subclassing RecipePanel to create one that includes a TextMeshPro widget for that purpose, and I noticed that the m_Recipe field in the class is private and, therefore, inaccessible to my subclass. Was that intentional, and if so, what's the recommended way for me to get the currently displayed recipe?

thanks!
Dave

Follow-up: I went ahead & changed the access level for that to protected and moved forward with my custom recipe panel. Works very well.
 
Last edited:
Very good catch! I usually set everything to protected to make it easier for people to inherit and modify the code. I'm not sure why the m_Recipe was private.

I made the field protected and added some public getter properties in case someone wants to access those values externally.
It'll be available in the next update
 
Top