• 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 nullpublic · Dec 13, 2011 at 10:07 PM · iosiphoneprojectsigabrt

SIGABRT when adding Unity to existing iOS project

I'm trying to add Unity to an existing iOS Xcode project. I have gotten it to build but when I try to show the unityController window it gives me a SIGABRT: " Assertion: should not be reached at tramp-arm.c:724", this is happening on "UnityInitApplication(appPath);" inside of "- (void) startUnity:(UIApplication)application"

I have looked around quite a bit on how to incorporate Unity with an existing project and it seems to be possible (looking at this post and others). I have been able to add code to the generated Unity project by following the post on blurst but I cannot seem to go the other way (add contents of the generated Unity project to an existing project).

Here is what I have done so far:

  • Added in sources from "Compile Sources" in the Unity project to my project

  • Added in libraries from "Link Binary With Libraries" in the Unity project to my project

  • Added "Classes" and "Libraries" directories under the Unity project to my "Header Search Paths"

  • Copied lines from the PCH in the Unity project to mine

  • Set up a basic "- (void)launchUnity" method in my AppDelegate similar to blurst

At this point the project builds but when I set the window in my AppDelegate to be "unityController->_window" and "makeKeyAndVisible" I get the aforementioned SIGABRT.

Any help or thoughts on this would be greatly appreciated!

Comment
Add comment · Show 1
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 Fattie · Dec 14, 2011 at 08:02 AM 0
Share

for the record, check out the super-useful "unity / iOS integration tool" which is offered for free on the asset store

1 Reply

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

Answer by nullpublic · Dec 16, 2011 at 01:32 AM

I added the following to main.mm and that resolved the problem. Unfortunately I'm getting another runtime crash now.

 #include "RegisterClasses.h"
 #include "RegisterMonoModules.h"

 static const int constsection = 0;
 void UnityParseCommandLine(int argc, char *argv[]);

 int main(int argc, char *argv[])
 {
     UnityParseCommandLine(argc, argv);
     RegisterMonoModules();
     // other main code here...
 }
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

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Create a game for both the iPhone and the Web Player 2 Answers

iPhone Resolution Screen Switch 0 Answers

Mini Mac - Can this Compile Unity? 2 Answers

Unity modules for iOS? 1 Answer

Game crashing on iOS after 3 second load of new scene. (How can I optimise loading) 0 Answers

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