change global variable in custom function

public class GameController : MonoBehaviour {

public float u1_1SCost, u1_1MCost;

public void unitConverter(float SCost, float MCost)
    {
        if (SCost >= 60)
        { MCost += Mathf.Floor(SCost / 60); SCost = SCost % 60; 
           Debug.Log(GameController.data.u1_1MCost); }
    }
}

  public class anotherScript: MonoBehaviour {

  GameController.data.unitConverter(GameController.data.u1_1SCost, GameController.data.u1_1MCost);

Why is Debug.Log still 0 when my SCost is 60?

I solved this (with help from Gamedev.net Discord Server) simply by putting “ref” keyword before method definition and calling method.