I have some variables in my Blueprint Widget, but I can’t access it. When I put a reference to this Blueprint, which I have named as “UI_BP”, it finds the reference, but I get the error:
-Blueprint Runtime Error: “Accessed None trying to read property RefUi”. Node: Custom Event Graph: EventGraph Function: Execute Ubergraph Bp Main Blueprint: Bp_Main
Yes, of course. I try to make reference with the widget but it doesn’t let me, as if I put reference to a BP Widget or the same BP that I have, “UI_BP” and the first option, gives me that error and the second, has no reference, which is the error that I exposed before.
I have tried to make this option the other way around, to make the code that I have in the “BP_Main”, in the Widget, but I don’t get the option to have an event that starts the BP as the BeginPlay. Anyway, I would like to do everything in the “BP_Main”, but the widget reference is null and I don’t understand why, since I have taken as reference my own BP, but it seems as if it is not referenced in the variable that I want it to access.
I attach the code. Thank you.
PS: In the first picture of the “BP_Main”, I have compile, is that I did not do it before the screenshot.
From the Create UI BP Widget, right-click on the return value and make it into a variable. With that done, you should easily be able to access it and its data. You should be able to reference the blueprint and all of its content.
I just fixed it my friend, thank you very much for everything @EliasWick .
But I would like to know the logic, why when I did it to yes it works and with the other not, if I made a reference also to my Blueprint Widget and let me access its variables?