I recently developed and published an app on android using Unity 5.3.1f1 and everything works fine. I want to create the iOS version and I have Unity 5.3.3f1 and Xcode 7.2.1 on a mac. I transferred the unity project folder to the mac and reopened in Unity without issues and the game works properly in the editor. I built the Xcode project and reopened in Xcode. The project generates a bunch of depreciation issues, but can be built and loaded into my iPad for testing.
In my game scene, I have all UI menus active and layered on top of each other. On Start(), I call gameObject.SetActive (false) on each UI panel to turn off each panel. This code works as desired in the android version. In the iOS build, all menus remain active on start. With toying around with the UI items and buttons in the scene, I can tell that the gameObject.SetActive (true/false) commands elsewhere in the code are working properly and that the integrated unityADs work.
I was initially concerned about the issues in Xcode, such as:
iOS/Classes/UI/UnityAppController+ViewHandling.mm:67:48: Incompatible pointer types assigning to 'UnityViewControllerBase *' from 'UIViewController *'
'UIScreenOverscanCompensationInsetApplicationFrame' is deprecated: first deprecated in iOS 9.0 - Use UIScreenOverscanCompensationNone
arm64 function not 4-byte aligned: ltmp0 from /Users/MukiXcoder/Documents/Num One iOS Build/Num One iOS/Libraries/libiPhone-lib.a(PLCrashAsyncThread_current-5565F35D16E4818B.o)
After a ton of google-searches, I troubleshooted with the following:
-Ensured IL2CPP backend and universal achitecture
-Tried both Unity 5.3.3f1 and 5.3.1f1
-Tried various iOS version targets between 6.0 and 9.0
At this point, I'm convinced it's a problem with the Start() function. The abbreviated version of the code in Start() looks something like this:
void Start () {
//Loading game data and important initialization variables (removed for clarity)
//Turn off the menus
settingsMenu.SetActive (false);
confirmationPanel.SetActive (false);
quitConfirmPanel.SetActive (false);
gameOverNote.SetActive (false);
achievementPanel.SetActive (false);
achievementNotification.SetActive (false);
achModeNotification.SetActive (false);
highscoreListings.SetActive (false);
detailedInstructionsPanel.SetActive (false);
displayOptionsPanel.SetActive (false);
helpAll.SetActive (false);
helpPanel1.SetActive (false);
helpPanel2.SetActive (false);
helpPanel3.SetActive (false);
adPanel.SetActive (false);
help1inst1.SetActive (false);
help1inst2.SetActive (false);
help1inst3.SetActive (false);
help1inst4.SetActive (false);
menuLock = false;
//UI Positioning/scaling code/UI text updating (removed for clarity)
StartCoroutine (CreateBoard ());
}
Any ideas? Thanks for any suggestions and help!
↧