I have recently created a new project to test out Adventure Creator 1.32 and it works fine on the desktop platform but on iOS I get the following two errors:
NullReferenceException: Object reference not set to an instance of an object
GlobalVariables.UpdateSelf () (at Assets/AdventureCreator/Scripts/Variables/GlobalVariables.cs:44)
GlobalVariables.Awake () (at Assets/AdventureCreator/Scripts/Variables/GlobalVariables.cs:26)
UnityEngine.Object:Instantiate(Object)
KickStarter:Awake() (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:129)and
NullReferenceException: Object reference not set to an instance of an object
AC.MenuSlider.RecalculateSize () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuSlider.cs:194)
AC.Menu.PositionElements () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:610)
AC.Menu.Recalculate () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:529)
AC.Menu.Copy (AC.Menu _menu) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:244)
PlayerMenus.Awake () (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:69)
UnityEngine.Object:Instantiate(Object)Never had these errors before.
Hope you can help.
Comments
Change:
#if (UNITY_IPHONE || UNITY_WP8)
to:
#if UNITY_WP8
There should be two more instances on lines 304 and 319. Do the same for those, and I'm hoping that will fix it.
GlobalVariables.cs, line 44. From:
if (GetComponent <Options>() && GetComponent <Options>().optionsData.linkedVariables != "")
to:
if (GetComponent <Options>() && GetComponent <Options>().optionsData != null && GetComponent <Options>().optionsData.linkedVariables != "")
If that works, I should be able to fix the other one too on my end.