Quantcast
Channel: Questions in topic: "namespace"
Viewing all articles
Browse latest Browse all 398

Null reference exception with static method

$
0
0
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);`

Viewing all articles
Browse latest Browse all 398

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>