• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Griffo · Dec 18, 2015 at 09:20 AM · errorbuildxcodebuild error

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?

alt text

screen-shot.jpg (404.4 kB)
Comment
Add comment · Show 7
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image fafase · Dec 18, 2015 at 09:28 AM 0
Share

It looks like you have a push_back method on the TheLab class that is running a NRE. Does it run fine in Editor?

avatar image Griffo fafase · Dec 18, 2015 at 09:29 AM 0
Share

Yes it runs fine in editor ..

avatar image fafase Griffo · Dec 18, 2015 at 09:36 AM 0
Share

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.

Show more comments
avatar image fafase fafase · Dec 18, 2015 at 10:48 AM 0
Share

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.

avatar image Griffo fafase · Dec 18, 2015 at 10:57 AM 0
Share

Ok .. I'll try .. Off to work now for 6 hours :( so I'll give it a go later, thanks.

Show more comments

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

36 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

IL2CPP Windows Build 0 Answers

Why I'm getting an “no such file or directory” Error in Xcode? 0 Answers

Unity Errors when building 0 Answers

Build failed with errors all of a sudden?? 0 Answers

Unable to install additional SDK platform. Please run the SDK Manager manually to make sure you have the latest set of tools and the required platforms installed. See the Console for details. 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges