You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi.
I want to make this tutorial of how I was able to run Unity 2018.3 + Vuforia 8 + Xcode 10. So, let's get started!
Configure
Create a new Swift proyect and save it wherever you want
Create a new Unity+Vuforia proyect and make your AR scene as usual
Unity Proyect:
When you are ready to export your Unity+Vuforia proyect, continue with this configuration:
Add the file XcodePostBuild.cs and configure the routes (follow the project tutorial if you don't know how to edit this file)
Go to Players settings -> other settings and:
3.1 Uncheck Auto Graphics API
3.2 Add OpenGLES2 in Graphics API
3.3 Remove Metal in the same list menu
3.4 Uncheck Metal Editor Support
3.5 For Scripting Runtime Version I'll be using .NET 4.x Equivalent
3.6 Architecture must be Universal
3.7 Uncheck Strip Engine Code
Export your Unity-Xcode project wherever you want
Swift Project:
When your Unity-Xcode project finish, go back to your Swift application. We'll be following the same steps of the swift-unity tutorial...
Copy entire Unity folder to the root of your Swift project to link it with the options "Copy items if needed" and "Create groups" checked.
Copy and paste the "Classes" and "Libraries" folders from the Unity export folder into the Xcode project into the previous Unity folder created, using the options "Copy items if needed" and "Create groups" checked.
Copy the "Data" folder into Xcode but, only with the “Create folder references” option.
Copy the "Vuforia" folder into Xcode using the options "Copy items if needed" and "Create folder references" checked. This folder can be found in your Unity-Xcode route your_unity_project/data/raw/Vuforia
At this moment, you must have this structure:
Note: If you don't see Exports.xcconfig file inside the Unity Folder, is already there... only add the reference to the file.
As I said before, I'll be using .Net 4.x so:
5. Open the Unity.xcconfig file and append -DNET_4_0 to OTHER_CFLAGS
6. Go in the General tab of the project and set the “Unity” configuration profile
7. Remove references of this files (Unity/Classes):
7.1 DynamicLibEngineAPI-functions.h
7.2 DynamicLibEngineAPI.mm
8. Go to the file in Unity/Classes/UI/SplashScreen.mm and change the line: #include "Classes/Unity/UnitySharedDecls.h"
with: #include "../Classes/Unity/UnitySharedDecls.h"
9. Go to the file in Unity/Classes/Unity/DeviceSettings.mm and add: return deviceUnknown;
between the lines 280-281 (after the #endif and } )
10. Go to your Target settings, in the section General->Embeded Binaries click on the + icon and Add other.... Navigate back to the Unity-Xcode proyect and look for the Vuforia.framework inside the root folder Frameworks. When selected, set the options "Copy items if needed" and "Create folder references" checked.
11. Go back to your Target settings and add AVKit.framework in section General->Linked frameworks and libraries
Now, your target settings must look as this:
If you followed this tutorial, now you'll be able to compile the swift project without errors. To display the Unity-Vuforia, just continue following the swift-unity tutorial... Update the AppDelegate.swift, set up your Controllers and/or Storyboards, set the camera policy in your info.plist... and that's it!
Thank you so much for taking your reading this tutorial.
I hope to be able to help you :)
The text was updated successfully, but these errors were encountered:
There is a small issue need to fix, we need to set Enable Testability to No.
As we use Xcode 10, the default project capability is "Xcode 9.3 compatible", and the "objectVersion = 50;" in pbxproj file. as you leave these new settings, you may encounter build error:
If you compare with the same item of older project
"LD xxx/Debug-iphoneos/Play.build/Objects-normal/arm64/Play normal arm64 (in target: Play)"
you will find an extra xlinker "-Xlinker -export_dynamic", which will make the building process failed. But if we change Enable Testability to No, that error will be fixed.
Hi.
I want to make this tutorial of how I was able to run Unity 2018.3 + Vuforia 8 + Xcode 10. So, let's get started!
Configure
Unity Proyect:
When you are ready to export your Unity+Vuforia proyect, continue with this configuration:
3.1 Uncheck Auto Graphics API
3.2 Add OpenGLES2 in Graphics API
3.3 Remove Metal in the same list menu
3.4 Uncheck Metal Editor Support
3.5 For Scripting Runtime Version I'll be using .NET 4.x Equivalent
3.6 Architecture must be Universal
3.7 Uncheck Strip Engine Code
Swift Project:
When your Unity-Xcode project finish, go back to your Swift application. We'll be following the same steps of the swift-unity tutorial...
At this moment, you must have this structure:
As I said before, I'll be using .Net 4.x so:
5. Open the Unity.xcconfig file and append -DNET_4_0 to OTHER_CFLAGS
6. Go in the General tab of the project and set the “Unity” configuration profile
7. Remove references of this files (Unity/Classes):
7.1 DynamicLibEngineAPI-functions.h
7.2 DynamicLibEngineAPI.mm
8. Go to the file in Unity/Classes/UI/SplashScreen.mm and change the line:
#include "Classes/Unity/UnitySharedDecls.h"
with:
#include "../Classes/Unity/UnitySharedDecls.h"
9. Go to the file in Unity/Classes/Unity/DeviceSettings.mm and add:
return deviceUnknown;
between the lines 280-281 (after the #endif and } )
10. Go to your Target settings, in the section General->Embeded Binaries click on the + icon and
Add other...
. Navigate back to the Unity-Xcode proyect and look for the Vuforia.framework inside the root folder Frameworks. When selected, set the options "Copy items if needed" and "Create folder references" checked.11. Go back to your Target settings and add AVKit.framework in section General->Linked frameworks and libraries
Now, your target settings must look as this:
If you followed this tutorial, now you'll be able to compile the swift project without errors. To display the Unity-Vuforia, just continue following the swift-unity tutorial... Update the AppDelegate.swift, set up your Controllers and/or Storyboards, set the camera policy in your info.plist... and that's it!
Thank you so much for taking your reading this tutorial.
I hope to be able to help you :)
The text was updated successfully, but these errors were encountered: