FIXED Tank components not working

Just leaving this as a heads-up to anyone who may encounter the same problem in the future, I cannot guarantee what the cause is but it seems as though when you save/compile your project without a reference to your tank turret or barrel, it removes them from your tank blueprint and if you add them and recompile, they get added back on but they are not attached. You have to go back in the tank blueprint and re-attach the the references:
UFUNCTION(BlueprintCallable, Category = Setup)
void SetBarrelReference(UTankBarrel* BarrelToSet);

UFUNCTION(BlueprintCallable, Category = Setup)
void SetTurretReference(UTankTurret* TurretToSet);

Took me a good while of debugging to realise :frowning:


Thank you for explaining this.
I to did not have any movement in the tanks after this session. No fire, no movement of the turret or barrel. So after reading this,
I opened the Tank_BP and Event Graph, where I could reconnect the “barrel” to “barrel to set” and the “Turret” to “Turret to set”

And now it works again. :grinning:

1 Like

Good God, Thank you!

Likewise I had this problem! I came on here to report that my barrel link had disconnected in the Event Graph of Tank_BP as well

But why would it disconnect when we changed from EditAnywhere to EditDefaultsOnly?

I would call it a bug. I can’t think of a good reason for it!

Privacy & Terms