I have a class in C++ that I want to access in BP. It appears to be fine in C++ but in BP I get Accessed None errors when I try to use it in BP. Here is the class declaration that I am trying to use in BP

class ZOMBIEHORDE_API UQualitySettings : public UObject


    // constructors


    // class functions and properties

I am holding on to it in the GameInstance as below so I can access it through the GameInstance reference.

class ZOMBIEHORDE_API UZombieHordeGameInstance : public UGameInstance



    UPROPERTY(BlueprintReadOnly, Category = "Zombie Game Instance")
    UQualitySettings *QualitySettings = nullptr;

And GameInstance .cpp

    QualitySettings = NewObject<UQualitySettings>();
    ensure(QualitySettings);// this passes and does not throw an error

This shows how I am accessing it in a widget blueprint.

enter image description here

So how can it be that accessing QualitySettings in BP is None?

  • \$\begingroup\$ You've shown the code for UZombieHordeGameInstance but your blueprint code references BP_ZombieHordeGameInstance. \$\endgroup\$
    – Rotem
    Dec 29, 2019 at 1:12
  • \$\begingroup\$ Have you tried pulling a Print String off of the Cast Failed execution pin of the Cast to BP_ZombieHordeGameInstance. It may be that it's not even getting that far when trying to call the Quality Settings \$\endgroup\$
    – Stephen
    Jan 3, 2020 at 10:44
  • \$\begingroup\$ I ended up doing a refactor of the code that avoids this. I never actually got to a solution. \$\endgroup\$ Jan 4, 2020 at 3:22
  • \$\begingroup\$ You should try and give your UObject a UPROPERTY - The GC assumes all objects that inherit from UObject have one. Try adding private: UPROPERTY() UQualitySettings* SelfRef = this; in the header file. \$\endgroup\$
    – Natalo77
    May 21, 2020 at 14:24

1 Answer 1


Perhaps the reflection system doesn't like the

UPROPERTY(BlueprintReadOnly, Category = "Zombie Game Instance") 
UQualitySettings *QualitySettings = nullptr; //try to remove the = nullptr from here.

Generally in UE4 we set the variables in constructor because of CDO and reflection system on-behalf.

  • \$\begingroup\$ I'll try but I would think since I'm setting the QualitySettings variable in the constructor and test its valid by calling ensure on it, that BP would see it as not nullptr anymore. Although I do know UE4 has a way of doing things sometimes that doesnt seem logical lol. I'll try it and see what happens. \$\endgroup\$ Dec 23, 2019 at 12:53
  • \$\begingroup\$ It was just a suggestion, although there is probably a reason noone uses the assign operator in var/property declaration (no where in UE4source as well). \$\endgroup\$ Dec 23, 2019 at 13:14
  • \$\begingroup\$ I still get the error. \$\endgroup\$ Dec 23, 2019 at 20:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .