I have a simple custom plane object with a Height and a Width properties.
I want to draw a sphere, that will cover the plane object so I have to figure out if Height is greater than Width or it’s the opposite to determine the radius. In other words, I’m not passing a constant - I’m passing a value, that requires some logic to be done before hand to be done first, to get the right value. I did this, and I didn’t get any visuals:
private void OnDrawGizmosSelected()
{
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(transform.position, Mathf.Max(Width, Height));
}
Of course if I explicitly tell it the radius (give it a constant) - it works.
Is there a way to do what I want? or this is just how it works? (the radius has to be a constant)
I tried sticking [ExecuteInEditMode] (doesn’t make so much sense but just a try) - it didn’t do anything.
Any ideas?
Thanks.