Forum rules - please read before posting.

Camera error - Can't get project working after V1.80.2 updating.

Hi..

I updated to V1.80.2 yesterday, now in all my scenes, and the AC demo ones produce this...

NullReferenceException
UnityEngine.Component.GetComponent[T] () (at <4746c126b0b54f3b834845974d1a9190>:0)
AC._Camera.get_Camera () (at Assets/AdventureCreator/Scripts/Camera/_Camera.cs:327)
AC.MainCamera.SetGameCamera (AC._Camera newCamera, System.Single transitionTime, AC.MoveMethod _moveMethod, UnityEngine.AnimationCurve _animationCurve, System.Boolean _retainPreviousSpeed, System.Boolean snapCamera) (at Assets/AdventureCreator/Scripts/Camera/MainCamera.cs:761)
AC.PlayerStart.SetCameraOnStart () (at Assets/AdventureCreator/Scripts/Navigation/PlayerStart.cs:202)
AC.PlayerStart.PlacePlayerAt () (at Assets/AdventureCreator/Scripts/Navigation/PlayerStart.cs:88)
AC.SceneSettings.AssignPlayerStart () (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:127)
AC.SceneSettings.OnStart () (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:109)
AC.SaveSystem+d__51.MoveNext () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:830)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <4746c126b0b54f3b834845974d1a9190>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
AC.SaveSystem:InitAfterLoad(Int32) (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:738)
AC.MultiSceneChecker:RunStartProcess() (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:122)
AC.MultiSceneChecker:Start() (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:54)

However, this happens only after the first play inside the unity editor ( I'm using 2021.3.16f1 ) - First time play it works fine and as normal... second and any other time hitting play I get the above.

After 5 mins of black screen the main camera displays but the main camera dosnt link itself to the first person or any active camera positions if in point and click mode.

Any Ideas?

Comments

  • I've unticked in AC Settings - 'Spawn PersisteneEngine prefab' and 'Auto-Call Resources.UnloadUnusedAssets' - and that seems to have stopped the issue for now.

  • Spoke too soon - ignore the last info

  • edited April 2

    Which version were you updating from, and on what platform?

    Is it the exact same error when running either of the demo games, and does this occur when you create a new scene and assign a default Camera in the Scene Manager?

    I can't reproduce the issue - from what you describe, it sounds like the Camera from the previous play is somehow being referenced.

    Does the issue occur in builds, and have you changed any fields in the Editor settings, e.g. disabled Domain Reloading?

  • I couldnt find the cause of the error, as it was happening in all scenes, including the demo's or new test scenes, I assumed there was something wrong in the project. Unity woudn't let me make a build.

    My 'fix' was to start an entire new project, and then copy over my assets, scenes and data, having first installed the latest AC update as a download.

    That seems to have worked.

  • Glad to hear it, thanks for the update.

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.