I’ve stumbled upon an issue where I can’t seem to figure out what exactly the issue causes. Let me try to explain it with a simple example :
I have a GameMode class, the GameMode will only be calling “GetAmountOfCars()” to fill in the widget.
In the game, we also have a CarManager UClass, deriving from UObject, having just a counter and a getter for the counter. We instantiate it with the BeginPlay function like, UCarManager* CarManager = NewObject<UCarManager>(); When we start the game, everything goes well, it has the value 0. At a random time, this value transforms into a value like -572662307. I have not set the counter anywhere, the getter is only called on the widget and on a few calculations. Am I doing something wrong here?
Thanks in advance!