Search Unity

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