Hi,
I’m new here in this forum, not sure if this is the right place to post this question!
I have promoted a variable (Speed Button W) to a variable (Current Active Button). Now when I need to set this new variable to another variable UE doesn’t allow me and show a message “Object reference is not compatible with … object reference”. I just can’t understand why when all the variables on the left variable panel are of the same type!
Any clue how can I change the variable (Current Active Button) to Music Button W?
Do you mean by dragging it from the “Music Button W”?
When I drag from this button I don’t find the variable “current active button” which I want to set, in the drop down menu!
Thanks… I found out that each one of my variables on the left panel is of a type of its own! I think this is the issue! I created each one as a widget. I don’t why they’re not showing all as widgets here!
You’re right. So if I exposed these variables, will this fix my issue?
I have checked all my widgets and found that they’re set as variable (“Is Variable” the tick in the image you attached). However, They’re still not exposed!
Here’s an example, The button ACButton is se as variable inside a widget called “MusicButton_W”. Now, when I added the “MusicButton_W” widget into another widget, it appear to be "not public and will not be editable!
I’m kind of lost, why the widget is not public when it is a variable? I couldn’t find a box to make the widget variable. I’m using UE 5.1…
You can ignore that closed eye. It means nothing here and it’s supposed to be like this. You can access it anywhere you want. By telling you it’s non-editable, the editor is preventing your from dereferencing it and leaking memory.
The top one is the actual button widget that you’ve placed in the designer - if you edit the ref itself, you could lose your button!
I mean I want to use a controller (i.e. Dualshock 5) to interact with the buttons inside of a widget. In another words, I don’t want to use the mouse to do so.
Well… I’m not sure if the eye is the issue or not. All I was trying to do is to set a variable to another button. Then the issue of “object reference not compatible” showed up!
The reason my variable “CurrentActiveButton” is of a type “Speed Button W” is because I promoted the button “SpeedButtonW” to a variable. This way it created a variable of the exact type! I don’t know why exactly!
I have tried to change the button type from “Speed Button W” into “Button” like you showed me in the photo you attached but when I do that I can no longer connect the “Speed Button W” to the variable! (photo attached).