Will this work or it will cause in built game?

Sanket Varia 4 years ago updated by Lazlo Bonin (Lead Developer) 4 years ago 2

Ok so i have a scene varaible transform target which is being referenced by player game object so that the enemy can chase it. But when enemy kills the player game object, player get destroyed and now the reference is missing in scene variable and that is giving me errors on console because enemy doesn't know now whome to chase. If i build my game then this shouldn't cause any problem right?

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

Yes, this will cause errors in your build, because there is a missing variable reference. This is not Bolt related, just logic.

You should add a Null Check unit in your enemy graph to stop it from trying to chase the player if the enemy got killed.