Xcode build error ..
Hi,
When trying to build to iOS with Xcode as it builds to the phone then starts to run I get the below error.
Does anyone know what this means please?
It looks like you have a push_back method on the TheLab class that is running a NR$$anonymous$$ Does it run fine in Editor?
and it shoots while loading the game or you are doing some actions before it shows up?
You could decorate the method with a bunch of :
Debug.Log("variableName is "+ variable == null);
So you could track if for some reasons, a reference is not behaving nicely.
It has happened that in Editor it goes fine because Unity runs things in a specific order. But once building the order is different and something ends up being not ready while you expect it to be.
That happens quite often with Awake since you cannot predict the order if not explicitly stated in the script execution order. I often end up having one guy controlling all subs and calling Init methods ins$$anonymous$$d of relying on Awake. I can then pass reference between subs and make sure that if sub A needs sub B then I run sub B first and pass it as argument.
So I would advise to place debugs in your method and create a more controlled system.
Ins$$anonymous$$d of having all classes using Awake and calling for other script in Awake, have a controller script that gets a reference to all those sub script. Then turn your Awake into Init and call them from the controller. If one class requires info from another, pass it from the controller. This way you will also remove dependencies between classes using interfaces for instance.
But first I would definitely place Debug all over and print out states of variable until you figure out which and why.
Ok .. I'll try .. Off to work now for 6 hours :( so I'll give it a go later, thanks.
Your answer
Follow this Question
Related Questions
Why I'm getting an “no such file or directory” Error in Xcode? 0 Answers
IL2CPP Windows Build 0 Answers
iOs build fails on 5.3 1 Answer
Apple LLVM 9.0 Error, Unable to execute command: Killed:9 0 Answers
Unity 3D Gradle Build Failed 1 Answer