Gizmo wont change color in certain project

I created a gizmo script that has a public color variable then in the ondrawgizmos I set the color to that variable. The intention is to have a color picker in the inspector to change the gizmo color. For some reason this does not work in my current project, I can set the gizmo color in my script to an exact color using Color.yellow etc and it will work. The weird thing is if I create a new empty project using the exact same script it works just fine, just not in the project I already have in progress. Any ideas on why this may be?

     public class CubeGizmo : MonoBehaviour
     {
        public Vector3 centerOffset = new Vector3(0, 0, 0);
        public Vector3 cubeSize = new Vector3(1.0f, 1.0f, 1.0f);
        public Color color;
     
        Vector3 origin;
        
        public void OnDrawGizmosSelected()
        {
           Gizmos.color = color;
           origin = transform.position + centerOffset;
           Gizmos.DrawCube(origin, cubeSize);
        }
     }

I guess we ran out of reply space, so I hadnt actually but I just now set it from black to red and when debugging it still shows black is assigned. [edit] actually red was assigned but red was not reflecting in the scene view of course.

In your comments above you stated

It will default to black in the editor and so will appear invisible for in the editor.

Do you mean it is just showing nothing in the scene then? The default value for a color field with no initialized value is (0, 0, 0, 0), which is of course transparent. Can you verify you have also set a non-zero alpha value when you use the color picker?

I’m having the same issue. Did you fix it?