Forum rules - please read before posting.

I now have a blank screen when hitting play.

Hi all i'm new here. I've only been using AC for a few days and set up a basic scene to start setting up cameras and see how they could work. now in my scene with three extra cameras when I press play the screen is grey but shows the hud. I'm getting a nullreferenceexception. 4 on player input.cs (line: 1283) and 4 on playerinteraction.cs (line: 1016) 

Object Reference is not set to an instance of an object.

I'm new to coding so I have no idea what this means.

Any ideas?

Many thanks,

Jack

Comments

  • Null reference means something is missing which is being called by a script.

    If its your own custom settings then double check your player prefab is set up correctly.
    It could be you have moved/lost some AC files so you might try reimporting the whole of AC (except the managers which you need to keep for your own game's settings).

    Hope this helps.
  • It's very weird. I've triple checked that the player prefab, the playerstart default camera and scene hierachy are all right. Now after restarting unity again the nullreferences are gone but the camera still shows nothing but grey. They aren't even stuck behind anything because it all looks fine in the scene view.

    It sucks but i'm probably just going to have to start my project again, there's probably something screwing up with unity.

    been at this hours :( 
  • Oh and thank you for your reply, forgot to say!
  • You shouldn't have to start your project again.  Have you tried reimporting AC?

    Another thing to try is to make a new scene with simple starting objects in and see if you have any better luck. If it works on a new scene then you can tell that something in your scene is the culprit.
  • I'd suggest upgrading to 1.42 before anything else, as it fixes quite a lot of bugs.

    If the camera is grey, a couple of things to check (while the game is running):

    1) Select the MainCamera in your scene and look at the bottom of it's Inspector - it will tell you what camera it is currently attached to.  If it isn't attached to anything, that could be the cause

    2) If it is attached to a camera, the cause is likely that the "attached" camera is in the wrong place (the MainCamera snaps itself to whichever camera is currently the active one).  It may be the settings you've assigned in it's inspector (you can move a GameCamera based on the player's position, for exampe), so double-check those.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.