Again: init variables in C++, then blueprints wipe it out.

This is madness!

I just added UPROPERTY line, recompiled it. And blueprints do not set that to nullptr

	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "_K2G|CelestialBody")
	UStaticMeshComponent* MyPlanetMesh = nullptr;

then i reverted it all to:

    UStaticMeshComponent* MyPlanetMesh = nullptr;

Without UPROPERTY like it was before, now everything works again. Blueprints no longer wipe it.

So yes mesh component was there, blueprints just wiped this variable for some reason.

1 Like