- Home /
Unity + XCode Problem (really wierd)
Hello Devs,
My target is iPad. I have only one scene on the "Build Settings". Beyond the only scene on the build settings, I have have lots of other scenes.
There was a time when for some reason (I do not know the reason though) Unity happen to wipe out my entire scene hierarchy. It just wiped it down. Then I started getting really weird errors.
Now every script on the project folder has no errors. I also do not see any errors on the Unity's Console. I also play on Unity which bring no errors to me.
Now when I Build & Run to my ipad, as soon as I start giving in Input, it starts giving me errors. These errors are from the scripts that are not even part of the project. They might be part of other scenes which is not inside the build settings. For example, when xcode runs the game while the device is still connected to the mac it reports a problem that is really weird. For example it says there is a problem with this piece of code
void OnGUI ()
{
GUI.Label(new Rect(10,10,50,50), Percentage.ToString ());
}
Then I delete this script from the project folder and try to Build & Run. Again xcode stops my game to run, as soon as I try to give Input. This time, it pops up a different error. The root to this error is also from a script that is not a part of the scene hierarchy and never an error at all.
Now I am trying to create the project from scratch and make it look like a completely new one. I am not sure how it is going to go. My concern is why? and What is happening.
Thank you.
I don't have a definite answer to the above but I would ios build to a fresh folder each time, i often get problems from building over the same folder (even thought Unity says it will delete it.)
About backing up (in case of unpredictable crud happening.) I keep all my scenes and all assets in the assets folder and I can usually copy that folder to a new project and unity is O$$anonymous$$.
Everything under the folder Resources will go to the final build, but I don't think it's the cause of your problem.
Jogo13 : I think you might be right. I might have to do a new build. But I did try that too. Absolutely no change. I actually had to build a completely new scene. WIth a new scene it works well though.
Paulo -> Even though all the files go to the final build, that particular scene has absolutely nothing to do with the only scene on the Build Settings.