I have some gaps in what seems like some basic knowledge concerning widgets and instancing. I have spent a lot of time hammering away at this, and tried many combinations of search terms and can’t quite figure out what I’m missing.
I have an object that I have presenting as an index card in-game. For components, it contains a static mesh (the card) and a widget (to display text and images on the card). This much is working, albeit a little odd-looking since I can’t figure out how to flatten the widget back against the mesh. I’m aware there is a way to project an image of the widget onto the card as a texture, which I’d love to do eventually, but I digress!
The object class itself is a C++ class, which I converted to a blueprint as I could not for the life of me figure out how to spawn more of the object that also contains a mesh and widget - again, something I’m sure is a lot more simple than my efforts would make it seem, and the fact that converting it into a blueprint took care of this particular issue tells me I’m missing something obvious (or maybe is a source of my problem!). The widget reads the variables generated by the C++ class without issue.
The level blueprint spawns 20 of these cards. Inspecting the individual cards shows that they all contain their own randomly-generated data, but each of their widgets is displaying the exact same things - the data from the first card. I assume this means the widgets are not actually being instanced and are all just copies of, or references to, the first and hence are all referencing the first card, but I can’t figure out why.
I suppose the core of the question is, how do I ensure that all the components of a given instanced object are using that instance of the object as their data source?
I’m also wide open to any suggestions as to how to go about this in a much more efficient or practical way. This is literally the first thing I’ve created in this particular project, so scrapping it wouldn’t be terribly painful.