So I read your PDF and I know what you are doing because I did exactly this with my BP_Texchange3, I made it a variable, it is public, but it STILL requires a target.
Maybe I did something wrong with it though, I’ll try it again and do it exactly how you did it.
If it doesn’t work, can I send you my example project and you just have a look at it? Who knows what I keep ■■■■■■■ up there. I’ll delete all the unnecessary stuff and comment on the rest, so you can figure out easily what is where.
Hey, here’s the project. It’s 60 mb though, but the only important things in there are the bp_texchange actor and the widget, everything is located in “FirstPersonBP”.
I’d really appreciate if you would take a look at it. The questionable code is in the WBP_InteractionUI2 where I try to access the boolean from the actor.
The workaround is also still in there, I just unplugged it, and I commented everything.
My problem really is getting the value of the boolean Ice1 in the WBP_InteractionUI2, which does not work right now.
I just had a quick glance at your project, mainly to see where things are and to familiarize myself a little.
The first thing that jumps out at me is a notice saying you are using an experimental class (“Here be dragons!” it tells me.). I hope this isn’t something only I get?!
I didn’t have much time to look at this today and I have a busy day tomorrow as well so I’m not sure when I’ll have an answer for you, but probably sunday evening or monday. If I solve it, that is.
So what I did see from my quick glance was that the problem with Ice1 most likely is the reference but there was no time to look into it any further today.
No, it’s the 3D widget component which is experimental.
I was wondering if the problem was that I can’t open the drop down menu and pick the actor there…I’ll also keep trying stuff, thanks for looking into it and have a nice weekend!
Ok so I tried making it work with the Texchange cube but interacting with a sphere instead of the widget, and it worked, because I could pick the actor in the sphere blueprint. I can even pick it in a normal widget, but not in that widget component widget. The moment I assign it in the component part of the actor blueprint using it, it doesn’t work anymore.
And someone wrote: “You need to get a reference from somewhere else (not a direct reference to the object by default or the level script). This can be achieved by spawning those actors, receiving them via “Get All Actors of Class”, overlap / collision events or by passing down a reference from somewhere else.”
This is exactly what I meant earlier.
I have no idea if there is a good workaround besides just casting to my actor.
Please tell if you get different results, but if not - what do you think is a better solution: Get all actors of class or cast to my player character (the workaround) ?
My weekend has been crazy and I have no energy left to explore your project today.
I wanted to try to set up an event dispatcher to see if that can work. If I can get that up and running you can most likely communicate directly betwren widget and actor blueprints.
But if that does not work you should go for the workaround. Forget Get all actors of class!