Hi, I just upgraded my project from 4.18 to 4.19, but it throws an error. I don’t know what is going on. Been googling and stuff for answers but no clue. It works fine on 4.18, I don’t know why the error comes out on 4.19.
Here’s the get/set of the HUD Reference, it doesn’t print any when I hit play, I did print the same thing on my 4.18 project, and it did prints out my HUD name. I don’t know what caused it.
Here’s the blueprint:
The the cast does not fail yet it throws an error above. I did call the HUDReferences function at the Event Graph. I’m not sure what am I missing here.
All right then. Next step is to go to the Player Controller and check what is happening to the Game HUD Reference there, apparently, it’s not being set.
Is the error message mentioned at the very beginning spammed constantly? I’m wondering whether the WeatherManager actor is allowed to tick before Begin Play. It’s at the top of the ClassDefaults - Allow Tick Before Begin Play.
So hold on, the Hud we see is the actual hud that is causing causing the access none errors?
Yup, it constantly spammed. I did tick the Allow Tick Before Begin Play check box too, both still throwing that same error, and yes, it is the same HUD.
I printed the GameHUDReferences after the Set inside MyPlayerController and it detects my HUD as well.
Right. So we’re at a stage where it’s reasonable to blame the engine.
If the project was originally created before 4.18, consider switching off the blueprint compilation manager and see if that helps. It’s in the Project Settings → Use Compilation Manger
if that does not help, recreate the part of code that is causing the issues if you have not done so already
None of it is working :’(, but I tried to replace the HUDReference with GameHUDReference directly from the MyPlayerController instead and its finally working!
Weird, but it works. So now I wonder if I really need to even create that HUDReference variable inside the Weather Manager in the first place… Btw thank you for the help, I appreciated it