• 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 /
avatar image
0
Question by grimmy · Jun 29, 2016 at 03:35 PM · iosxcodenull reference exception

Why do I get 'a null value was found where an object instance was required' pointing to an empty function?

My game works totally fine in editor but when I try to build to iOS Xcode gives me this error pointing to SimpleDrag.Start() The game loads but goes completely black straight after the load screen although continues to run (I think).

The Start() function in SImpleDrag.cs script has no code inside it. What can I do?

I am using Xcode 7.3.1 and Unity 5.3.5

Cheers

Comment
Add comment · Show 6
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 Dave-Carlile · Jun 29, 2016 at 04:31 PM 0
Share

What happens if you remove the Start method or add code to it?

avatar image grimmy Dave-Carlile · Jun 29, 2016 at 04:54 PM 0
Share

Hmm. I removed the start function completely I now the error points to the SimpleDrag.Update() function ins$$anonymous$$d....?!

avatar image grimmy grimmy · Jun 29, 2016 at 05:32 PM 0
Share

..and then if I remove that function it simple errors at the next function down in the script (in this case... ResetToSTartPosition()) my guess is that the whole script is somehow broken internally or something. I really don't understand it.

Show more comments
avatar image grimmy · Jun 30, 2016 at 04:54 AM 0
Share

I deleted the library folder and re-imported everything. I even tried recreating the script with a different name but I still get the error. I'm about to completely remove the script and see if I get any other errors...

avatar image grimmy grimmy · Jun 30, 2016 at 05:28 AM 0
Share

..now it says the same error but Filename: currently not available on il2cpp. Great..now I don't even know where the error is co$$anonymous$$g from. I need to guess?

I notice now to that above this there are now 4 warnings about Shaders being unsupported. eg Standard -Pass FORWARD has no vertex shader etc. Could these be relevant? They weren't here before.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by grimmy · Jun 30, 2016 at 07:15 AM

Ah ha. Well this is kind of embarrassing but the issue was that somehow the in my build setting the order of scenes had got messed up meaning that it was trying to initialize the wrong scene first. Of course it all worked fine in the editor because I would naturally run the game from the correct scene.

No idea how the scene order got messed up. I think it may have been from the installation of a package I was testing.

Oh god...oh god...thank god that's over.

Comment
Add comment · Share
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

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

57 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 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

iOS Project Upgrade 1 Answer

Support for Delta Updates in Unity 1 Answer

how to fix the "unityexception : launching ios project via xcode failed" exception ? 0 Answers

huge iOS build size even with empty scene 0 Answers

ISN_GameCenterManager.mm - No matching function for call to 'UnitySendMessage' 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges