Fix for iOS with latest Unity 2019.3.5
This commit is contained in:
parent
192aaeb1b2
commit
1cfa3630c0
|
@ -1,3 +1,7 @@
|
||||||
|
## 0.1.6+6
|
||||||
|
|
||||||
|
* Breaking change for unityframework iOS
|
||||||
|
|
||||||
## 0.1.6+5
|
## 0.1.6+5
|
||||||
|
|
||||||
* Reworked onUnityMessage for iOS [@krispypen](https://github.com/krispypen)
|
* Reworked onUnityMessage for iOS [@krispypen](https://github.com/krispypen)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_unity_widget","dependencies":[]}]}
|
|
@ -38,7 +38,17 @@ UnityFramework* UnityFrameworkLoad()
|
||||||
NSBundle* bundle = [NSBundle bundleWithPath: bundlePath];
|
NSBundle* bundle = [NSBundle bundleWithPath: bundlePath];
|
||||||
if ([bundle isLoaded] == false) [bundle load];
|
if ([bundle isLoaded] == false) [bundle load];
|
||||||
|
|
||||||
|
|
||||||
UnityFramework* ufw = [bundle.principalClass getInstance];
|
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;
|
return ufw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,8 +61,8 @@ extern "C" void InitUnity()
|
||||||
|
|
||||||
ufw = UnityFrameworkLoad();
|
ufw = UnityFrameworkLoad();
|
||||||
|
|
||||||
[ufw setDataBundleId: "com.unity3d.framework"];
|
// [ufw setDataBundleId: "com.unity3d.framework"];
|
||||||
[ufw frameworkWarmup: g_argc argv: g_argv];
|
// [ufw frameworkWarmup: g_argc argv: g_argv];
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void UnityPostMessage(NSString* gameObject, NSString* methodName, NSString* message)
|
extern "C" void UnityPostMessage(NSString* gameObject, NSString* methodName, NSString* message)
|
||||||
|
|
10
pubspec.yaml
10
pubspec.yaml
|
@ -1,10 +1,10 @@
|
||||||
name: flutter_unity_widget
|
name: flutter_unity_widget
|
||||||
description: Flutter Unity 3D widget for embedding Unity game scenes in flutter. This library now supports Unity as a Library.
|
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
|
version: 0.1.6+6
|
||||||
authors:
|
#authors:
|
||||||
- Rex Raphael <rex.raphael@outlook.com>
|
# - Rex Raphael <rex.raphael@outlook.com>
|
||||||
- Thomas Stockx <thomas@stockxit.com>
|
# - Thomas Stockx <thomas@stockxit.com>
|
||||||
- Kris Pypen <kris.pypen@gmail.com>
|
# - Kris Pypen <kris.pypen@gmail.com>
|
||||||
homepage: https://github.com/snowballdigital/flutter-unity-view-widget/tree/master
|
homepage: https://github.com/snowballdigital/flutter-unity-view-widget/tree/master
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|
Reference in New Issue