Hi There,
Sorry if this has been answered already elsewhere, I've revisited an old project, created in Unity 4.3.4 with the AC 1.32 (which all still works ok). I've upgraded to the newest AC version (1.50i) and using Unity 5.3.3f1, I've upgraded my project and after getting rid of a few of the errors from the older Unity stuff, I'm still stuck with just one last one when I'm running:
NullReferenceException: Object reference not set to an instance of an object
AC.StateHandler.InitPersistentEngine () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:77)
AC.StateHandler.OnAwake () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:65)
AC.KickStarter.SetPersistentEngine () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:101)
AC.KickStarter.OnAwake () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:882)
AC.MultiSceneChecker.Awake () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:27)
I'm assuming that it's probably down to so many changes in the latest updates, I was hoping that I would be able to get this running quite quickly without having to setup a new project from the wizard. It does look like the error is preventing the MainCamera from being assigned to the default camera listed in the scene menu, but there's no player control or UI working at the moment,
I'm also getting some warning too which are along the lines of:
Hotspot 'Hotspot_ExtDoor' has been temporarily upgraded - please view its Inspector when the game ends and save the scene.
-----------------------------
UnityEngine.Debug:Log(Object)
AC.ACDebug:Log(Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:17)
AC.Hotspot:UpgradeSelf() (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:173)
AC.Hotspot:Awake() (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:95)
I'm not sure if this is of any help with the error?
Thanks in advance for any help.
Cheers
Craig
Comments
Wow, very old indeed!
The 1st error is appearing because AC cannot find the "Runtime Variables" component on the PersistentEngine prefab (which may also be the cause of #3). Check your PersistentEngine prefab and add it on manually if it's not present (you can find it in /Assets/AdventureCreator/Resources).
AC should have detected this missing script and reported it specifically in another Console message. Does this warning not appear? Your comment about it also occuring from a reimport leads me to wonder if this is because of your switching Unity version during the upgrade:
Several versions of AC are uploaded for each release - each one for a different version of Unity. AC for Unity 4 is not the same as Unity 5 (technically speaking), so make sure you re-download the asset package, rather than simply re-import it, once you're working in Unity 5.
The warning message about the Hotspot is unrelated, but should be heeded: view the Inspector of the Hotspot in question and save the scene.