Forum rules - please read before posting.

Null Refs Upon Re-Opening Scene

Hey,

Having a problem where I am receiving two null reference errors upon running a scene, after closing Unity and then re-opening a scene.

If I create a new blank scene and use the New Game Wizard, the scene runs great. But if I close Unity and then re-open the scene, I receive the two attached errors. This happens every time a make a new game via the wizard.

I have little to no experience with code so any advice as to how I can fix this would be amazing.

Cheers!

NullReferenceException: Object reference not set to an instance of an object
AC.KickStarter.PreparePlayer () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1138)
AC.KickStarter.Initialise () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1119)
AC.MultiSceneChecker.Awake () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:43)

NullReferenceException: Object reference not set to an instance of an object
AC.PlayerCursor.set_SelectedCursor (System.Int32 value) (at Assets/AdventureCreator/Scripts/Controls/PlayerCursor.cs:1185)
AC.PlayerCursor.Start () (at Assets/AdventureCreator/Scripts/Controls/PlayerCursor.cs:59)

Comments

  • Small update - if I double click my ManagerPackage upon booting up Unity it runs the scene without error. Is this expected behaviour?

  • What's your AC version? The error suggests it's not recent.

    For AC to run, however, you must have all 8 Manager assets assigned in your AC Game Editor window. These assets are generated when using the New Game Wizard - see the bottom of the tutorial here.

    Double-clicking the ManagerPackage file re-assigns these asset files if they've become unset, but it shouldn't be necessary to do each time you re-open Unity. Are you saving the project once the Managers are assigned, but before quitting?

  • I checked versions and there is conflicting information. In the Package Manager it says I have the latest (1.73.2) downloaded, but the Adventure Creator About window displays 1.72.4. I purchased the asset in January and Imported it around then.

  • I deleted the Adventure Creator root folder and reimported the package from the Package Manager and it still imports version 1.72.4 even though the Manager states that it should be downloading 1.73.2 - perhaps this is a Unity issue more than anything

  • Yes - the Package Manager does have some unfortunate issues when it comes to grabbing the latest asset release. See Kai's suggested in this thread for a potential workaround.

    The AC version you're using, however, shouldn't affect the original issue - unless you've imported a hybrid of the two versions. The error messages you were reporting were due to a lack of Manager assets being assigned in the AC Game Editor window.

  • OK so the Package Manager now displays an Update button on this package and allowed be to upgrade to the latest version - this seems to have solved my issue. I'm not quite sure what I did to make that appear but at least it has. My apologies this looks to have been something not quite right with the Package Manager interface. Thanks for your help regardless.

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.