I am trying to wrap my head around the concept of the Canvas in Unity and its many uses especially outside of user interfaces. However, I cannot really find a good tutorial that digs deep enough into it; so, I was hoping that I can find some help here.
The concept of a user interface needing to have a separate wrapper layer to position elements overlaying the game window does, kinda-sorta, make sense, and I have created one that works fine at the moment. What does not make sense is how everything that contains text also needs to be inside a canvas object to even be visible. I don't understand how a canvas makes sense when I want to display non-UI game elements that contain text, such as damage counters or, as in the case of the game I started working on, playing cards.
Furthering the concept of playing cards, it gets even more complicated. If I understand it correctly, I would not only need a canvas to place my cards on (preferably separate from the one that contains my UI elements) but if I want to put text on my cards and make them come from a reusable Prefab, the Prefab itself needs to be a canvas (or somehow contain one), otherwise text elements would not show up on it (at least based on my trials).
Now, I have read about and actually tried the Text Mesh Pro framework, but honestly I don't need that bloated functionality; a simple text would be perfectly fine for my needs, if only I could make it work.
My question is, can someone briefly illustrate how to work with canvases and text-based game objects (preferably in the context of a card game). My cards need to contain an image and several text fields to display various information. What would be the best way to create a Prefab to initialize these cards? Then, what would be the most optimal way to display these cards on the scene (they should not be part of the UI but the game itself).
My game is 2D and uses a pixel art aesthetic if it is relevant.
Many thanks for your answers!