Search Unity

Bug Editor Connections not working

Discussion in 'Editor & General Support' started by SeaBass-123-, Dec 29, 2023.

  1. SeaBass-123-

    SeaBass-123-

    Joined:
    Dec 14, 2022
    Posts:
    7
    Hey, so I have this issue with a 3d movement script, where it works fine but I can't test it out because it gives me an error and says this: "UnassignedReferenceException: The variable orientation of CameraPosition has not been assigned. You probably need to assign the orientation variable of the CameraPosition script in the inspector. UnityEngine.Transform.set_rotation". I understand what its saying, but what its referencing has already been assigned, as you can see here; (Orientation is a child game object under the player, its not blank) upload_2023-12-29_10-59-13.png Help would really be appreciated, thanks!
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,698
    That just means you THINK you finished Step #1 when in fact you did not.

    Something else is null. Keep studying.


    Remember that prefabs can never refer to in-scene objects.



    The answer is always the same... ALWAYS!

    How to fix a NullReferenceException error

    https://forum.unity.com/threads/how-to-fix-a-nullreferenceexception-error.1230297/

    Three steps to success:
    - Identify what is null <-- any other action taken before this step is WASTED TIME
    - Identify why it is null
    - Fix that