My static method that i've set within an abstract class using a custom namespace keeps giving me a null reference exception when i try to pass a Vector3 to it.
using UnityEngine;
namespace DebugUtility
{
public class DebugUtility
{
public static void DisplayInfo(Vector3 pos, string info)
{
Vector3 pointOnScreen = Camera.main.WorldToScreenPoint(pos);
//rest of the code
}
}
}
I call it with: `DebugUtility.DebugUtility.DisplayInfo(Vector3.zero,text);`
↧