Okay this is not an issue but it is actually a feature of Visual Studio, it was giving me red squiggles because I added the method under UNITY_EDITOR directive and was using it in a method that was not under that directive