Fix for iOS with latest Unity 2019.3.5

This commit is contained in:
Rex Isaac Raphael 2020-03-19 11:16:21 +01:00
parent 192aaeb1b2
commit 1cfa3630c0
4 changed files with 22 additions and 7 deletions

View File

@ -1,3 +1,7 @@
## 0.1.6+6
* Breaking change for unityframework iOS
## 0.1.6+5
* Reworked onUnityMessage for iOS [@krispypen](https://github.com/krispypen)

View File

@ -0,0 +1 @@
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_unity_widget","dependencies":[]}]}

View File

@ -38,7 +38,17 @@ UnityFramework* UnityFrameworkLoad()
NSBundle* bundle = [NSBundle bundleWithPath: bundlePath];
if ([bundle isLoaded] == false) [bundle load];
UnityFramework* ufw = [bundle.principalClass getInstance];
if (![ufw appController])
{
// Initialize Unity for a first time
[ufw setExecuteHeader: &_mh_execute_header];
// Keep in sync with Data folder Target Membership setting
[ufw setDataBundleId: "com.unity3d.framework"];
}
return ufw;
}
@ -51,8 +61,8 @@ extern "C" void InitUnity()
ufw = UnityFrameworkLoad();
[ufw setDataBundleId: "com.unity3d.framework"];
[ufw frameworkWarmup: g_argc argv: g_argv];
// [ufw setDataBundleId: "com.unity3d.framework"];
// [ufw frameworkWarmup: g_argc argv: g_argv];
}
extern "C" void UnityPostMessage(NSString* gameObject, NSString* methodName, NSString* message)

View File

@ -1,10 +1,10 @@
name: flutter_unity_widget
description: Flutter Unity 3D widget for embedding Unity game scenes in flutter. This library now supports Unity as a Library.
version: 0.1.6+5
authors:
- Rex Raphael <rex.raphael@outlook.com>
- Thomas Stockx <thomas@stockxit.com>
- Kris Pypen <kris.pypen@gmail.com>
version: 0.1.6+6
#authors:
# - Rex Raphael <rex.raphael@outlook.com>
# - Thomas Stockx <thomas@stockxit.com>
# - Kris Pypen <kris.pypen@gmail.com>
homepage: https://github.com/snowballdigital/flutter-unity-view-widget/tree/master
environment: