Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

2 NullReference Problems

Discussion in 'Immediate Mode GUI (IMGUI)' started by RBB, Jun 8, 2011.

  1. RBB

    RBB

    Joined:
    Apr 12, 2011
    Posts:
    35
    02 Different GUIs.

    First one:(sometime appears and sometimes no)

    NullReferenceException: Object reference not set to an instance of an object
    Boo.Lang.Runtime.RuntimeServices.CheckNumericPromotion (IConvertible convertible)
    Boo.Lang.Runtime.RuntimeServices.CheckNumericPromotion (System.Object value)
    Boo.Lang.Runtime.RuntimeServices.UnboxSingle (System.Object value)
    sub.OnGUI () (at Assets/various/scripts/sub.js:72)

    Reference code:
    Code (csharp):
    1. GUI.Box (new Rect (10, 10, timeb, 20), "", bstyle);
    Second problem:(always appears)

    NullReferenceException
    player.Update () (at Assets/Scripts/player.js:13)

    Code (csharp):
    1. keyRot.transform.Rotate (Vector3 (0,1,0));
    Please. Some help.

    Thanks.
     
    Last edited: Jun 8, 2011
  2. Ultimatemau

    Ultimatemau

    Joined:
    Mar 1, 2011
    Posts:
    17
    Can you show me some more code?

    Cheers