For anyone having issues with OnDrawGizmosSelected displaying

I had an issue where the gizmo was not displaying the radius around the enemy when it was selected.
I double and triple checked my code, but it still would not show up.

If the “Enemy AI” script is collapsed in the inspector, the gizmo will not show up. The solution was to expand the script in inspector. Once the script is expanded, it works great.

Not sure why this behavior exists, but hopefully this can save someone the half hour I spent troubleshooting this :slight_smile:

Unity 2020.2.2f1


Privacy & Terms