Can't access gameState or gamemode

Hi,

I derived a blueprint class from a cpp class (which itself derives from UObject).

I am trying to access either GameState or GameMode in that blueprint but it doesnt show up on the menu. I also tried to create that node in a different blueprint and copy it to the first blueprint but it doesnt show up.

Can anyone point me the problem?

It’s because you are inheriting from UObject, which doesn’t have access to those, it can’t use functions requiring a reference to the World. You could inherit from Actor instead, unless there is a specific reason you don’t want to?

If you need to do it this way try adding meta = (ShowWorldContextPin) to your UCLASS declaration.

Yea I needed it to be like that. Thank you, that configuration solved it.