Grid panel reference

Hello everyone!
I’ve been creating visual novel and so I was setting up Uniform Grid. But for some reason it doesn’t let me. I am new to ue so I don’t have enough experience.
Highly appreciate if you could help me with this. I was following a tutorial and in that tutorial this variable converted automatically and I simply cannot understand how to convert it manually and into what.
image

1 Like

The error says you are trying to perform an action on a “thing” it is not expecting, like trying to make a pear talk. This happens when “ChoicesGridPanelHUD” is not of type “UniformGrid” so you can’t treat it like a uniform grid. The solution here is not to convert (Cast) it but to provide a UniformGrid pointer to the Target pin of that method.

3 Likes

Hey! Not totally sure what you mean about the variable converting automatically, but it looks like the uniform grid you referenced making was made inside of a second widget blueprint, and now you’re trying to drag the reference to that blueprint into your “Add Child to Uniform Grid” function’s target.

If that’s right, then here’s what I’d suggest for a quick fix:
First, go to your Uniform Grid’s widget blueprint, and ensure your Uniform Grid has “Is Variable” ticked to true.

Then going back to your original blueprint, drag out of the reference you’ve made to your grid widget (Choices Grid Panel HUD), and locate the Uniform Grid Variable you’ve made, like so:

Just so you know though, there’s many different ways to handle this specific thing, so feel free to try out other options. (Or let me know if this wasn’t the problem!) Good luck!

3 Likes

Thank you so much! Yes, the problem was that I didn’t click “Is variable”. Ur the best :slight_smile:

1 Like