DrawGizmos not called in build

Hi there,

I have an issue where the DrawGizmos method is not called in a build (Win64).

This is the code I am using and it works fine in Editor

       internal class VmTowerInfoMono : MonoBehaviourGizmos {

    public override void DrawGizmos() {
        if(tower == null || tower.AssignedUnitData == null || tower is IBlockerTower) {
            return;
        }

        using(Draw.ingame.WithColor(Color.white)) {
            if(tower.AssignedUnitData.Type == FriendlyUnitType.VigilsHammer) {
                Draw.ingame.Circle(transform.position, Vector3.up, tower.GetUnitRadius());
            } else {
                Draw.ingame.Circle(transform.position, Vector3.up, tower.GetUnitRange());
            }
        }
    }

Proof that it’s there:

I am probably missing sth extremely obvious but I couldn’t figure it out from the docs.

Best regards,
Daniel

Hi

This is expected. The DrawGizmos method is only for editor-gizmos.

If you want to render things in-game, use Update instead.

See also: Drawing in a game - ALINE

I see, thanks for the info!

Best regards,
D