Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Unsubscribing Event NullReferenceException

$
0
0
I just started to experiment with events. This error sometimes happens when I exit play mode in the editor.

NullReferenceException: Object reference not set to an instance of an object
PlayerController.OnDisable () (at Assets/Scripts/PlayerController.cs:176)

PlayerController Script:
Code (CSharp):
  1.     private void OnEnable()
  2.     {
  3.         GameGraphics.Instance.OnFOVChange += HandleCameraFOV;
  4.         OnFallGroundHard += PlayHit;...
Unsubscribing Event NullReferenceException

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



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