I dont know if its the Engine or Something Ive done because for some reason I can not Promote to Variable and Reference it Any where without it Giving me a Error of (Access of None) even though it comes straight from the source. Example - Get Actor of Class and Promote it to a Variable. So now i should be able to use that promoted variable to use as a reference instead of using Get Actor of Class every time.
Is there a reason this is happening or could it be something I’ve done in my project
Promote to variable is simply a quick-access way to make a variable and set it to whatever you’ve dragged off of. I think you’re assuming that “Promote to variable” in some way links the return value to that variable or whatever, but it doesn’t do anything that fancy- it’s just a quality of life feature. It doesn’t do anything you can’t see, and it’s all done when you click that button- not at runtime.
Yes. Promote to variable created a variable and added a set node to your blueprint graph. Assuming that set node fires (at runtime) and the actor it found isn’t deleted, it will be valid. Keep in mind that it also isn’t guaranteed to find anything- if you don’t have an actor of that class in your level when it’s fired, it won’t record anything.
Trying to access the variable before that set node has been fired would also cause an access of none error.
I know how they work and all that, its just for some reason anything I promote to a variable does not work. Like inside my Game Instance I have a HUD being created and when i call it on the level BP its saying the Add to Viewport access none even though its on the screen
I have no clue what could be wrong here. Try clicking on the magnifying glass next to “Add to Viewport” in the error message. Make sure the node causing an error is actually that one.
Widgets are some of the most annoying things to get rid of- I’m not sure how that could’ve happened.
Also make sure you don’t have two variables that are very similarly named. You can’t make duplicate variable names, but you can have spaces:
All different variables, just with a different number of spaces following the “HUD”
That might be the cause of your issue. This logic should be in the player controller, not the game instance.
I could see that becoming an issue when changing levels, trying to reference a widget that only exists in the previous level.
But thats not my real issue
When i Promote anything to a variable I get the same thing,
Access of None
You’ve done a CastToThirdPersonCharacter or whatever and promote it to a variable on a begin play or something.
I cant do that, its just says Accessed None
Weirder and weirder.
This almost seems like a case of having two editor windows open at once. Often causes a lot of issues like this. Could you relaunch the editor and make sure you don’t have any other unreal thing open in task manager?
You are able to save even with two instances open, it just causes other issues.
But it seems like that wasn’t the case anyways. If you’re comfortable with it, you could DM me the project and I could take a look directly-