Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New example with Flutter <-> Unity communcation & iOS fixes #61

Merged
merged 5 commits into from
Oct 17, 2019

Conversation

thomas-stockx
Copy link
Collaborator

@thomas-stockx thomas-stockx commented Oct 17, 2019

I've updated the example to include Flutter to Unity and Unity to Flutter communication so this PR
fixes #35
fixes #36
fixes #33
fixes #41

@krispypen made sure the example works on iOS, so this PR also
fixes #38
fixes #56
Probably also fixes #60

@krispypen
Copy link
Collaborator

🎉

@krispypen krispypen mentioned this pull request Oct 17, 2019
@juicycleff
Copy link
Owner

@thomas-stockx and @krispypen you two are awesome. We can give you access too to manage stuff here, seeing how busy I am becoming

@juicycleff juicycleff merged commit 8bdf900 into juicycleff:master Oct 17, 2019
@thomas-stockx
Copy link
Collaborator Author

@juicycleff That would be nice :)

@juicycleff
Copy link
Owner

@juicycleff
Copy link
Owner

Thanks again we do appreciate it

@thomas-stockx
Copy link
Collaborator Author

Thanks man 👍

@rezajam
Copy link

rezajam commented Jan 1, 2020

I'm still having the following error:

Ld /Users/XXXXXXX/Library/Developer/Xcode/DerivedData/Runner-bajlhudeslpnyrbncvmddahlibcy/Build/Products/Debug-iphoneos/UnityFramework.framework/UnityFramework normal arm64
cd "/Users/XXXXXXX/Desktop/unity 2/flutter-unity-view-widget-master xport/example/ios/UnityExport"
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target arm64-apple-ios10.0 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.2.sdk -L/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/Runner-bajlhudeslpnyrbncvmddahlibcy/Build/Products/Debug-iphoneos -L/Users/XXXXXXX/Desktop/unity\ 2/flutter-unity-view-widget-master\ xport/example/ios/UnityExport/Libraries -F/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/Runner-bajlhudeslpnyrbncvmddahlibcy/Build/Products/Debug-iphoneos -filelist /Users/XXXXXXX/Library/Developer/Xcode/DerivedData/Runner-bajlhudeslpnyrbncvmddahlibcy/Build/Intermediates.noindex/Unity-iPhone.build/Debug-iphoneos/UnityFramework.build/Objects-normal/arm64/UnityFramework.LinkFileList -install_name @rpath/UnityFramework.framework/UnityFramework -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -map -Xlinker /Users/XXXXXXX/Library/Developer/Xcode/DerivedData/Runner-bajlhudeslpnyrbncvmddahlibcy/Build/Intermediates.noindex/Unity-iPhone.build/Debug-iphoneos/UnityFramework.build/UnityFramework-LinkMap-normal-arm64.txt -dead_strip -Xlinker -object_path_lto -Xlinker /Users/XXXXXXX/Library/Developer/Xcode/DerivedData/Runner-bajlhudeslpnyrbncvmddahlibcy/Build/Intermediates.noindex/Unity-iPhone.build/Debug-iphoneos/UnityFramework.build/Objects-normal/arm64/UnityFramework_lto.o -Xlinker -no_deduplicate -fembed-bitcode-marker -stdlib=libc++ -fobjc-arc -fobjc-link-runtime -weak_framework CoreMotion -weak-lSystem -liPhone-lib -framework Security -framework MediaToolbox -framework CoreText -framework AudioToolbox -weak_framework AVFoundation -framework AVKit -framework CFNetwork -framework CoreGraphics -framework CoreMedia -weak_framework CoreMotion -framework CoreVideo -framework Foundation -framework OpenAL -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -framework UIKit -liconv.2 -lil2cpp -weak_framework Metal -Xlinker -dependency_info -Xlinker /Users/XXXXXXX/Library/Developer/Xcode/DerivedData/Runner-bajlhudeslpnyrbncvmddahlibcy/Build/Intermediates.noindex/Unity-iPhone.build/Debug-iphoneos/UnityFramework.build/Objects-normal/arm64/UnityFramework_dependency_info.dat -o /Users/XXXXXXX/Library/Developer/Xcode/DerivedData/Runner-bajlhudeslpnyrbncvmddahlibcy/Build/Products/Debug-iphoneos/UnityFramework.framework/UnityFramework

Undefined symbols for architecture arm64:
"_onUnityMessage", referenced from:
_UnityMessageManager_onUnityMessage_mC3031C4585567E720F536DB4EE28B0C20AB8A7C4 in Assembly-CSharp.o
(maybe you meant: _UnityMessageManager_onUnityMessage_mC3031C4585567E720F536DB4EE28B0C20AB8A7C4)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

ANY help is greatly appreciated!

@leemuljadi
Copy link

Hi @thomas-stockx,

I have added the files and the code below to send message from Unity to Flutter:
Files:
image
Code:

 // This method is used to send data to Flutter
 UnityMessageManager.Instance.SendMessageToFlutter("The cube feels touched.");

But the message still not appearing, do I actually need to edit the file in Unity and export it to Android again or I can just edit it in Android Studio in my Flutter Project?

@thomas-stockx
Copy link
Collaborator Author

Every time you make a change to the Unity project, you need to export it again.

@krunduev
Copy link

I'm still having the following error:

Undefined symbols for architecture arm64:
"_onUnityMessage", referenced from:
_UnityMessageManager_onUnityMessage_mC3031C4585567E720F536DB4EE28B0C20AB8A7C4 in Assembly-CSharp.o
(maybe you meant: _UnityMessageManager_onUnityMessage_mC3031C4585567E720F536DB4EE28B0C20AB8A7C4)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

ANY help is greatly appreciated!

I have too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment