Closed what2003 closed 3 years ago
Have built plane finder scene in Unity2021.1.15f1 ArFoundtion4.15, works fine in flutter built on Iphone. But it also shows error message"[Subsystems] Failed to initialize subsystem ARKit-Meshing [error: 1]", don't know why but apparently it doesn't matter. "[General] No resource group with name "ReferenceImageLibrary_0D75963B-ACC4-974A-9BC3-CE6A5DE9A3D7" found InvalidOperationException: Failed to resolve image library 'ReferenceImageLibrary'. There is no matching resource group, or the resource group does not contain any reference images." is the real problem. I'm learning to create MutableRuntimeReferenceImageLibrary and add images in runtime, maybe that can work.
The conclusion is creating ReferenceImageLibrary in Editor would fail! In script so far works for me.
trackImageManager = gameObject.AddComponent
Tried ARfundation ImageTracking scene in flutter, got"Failed to initialize subsystem ARKit-Meshing [error: 1]". Built by Unity is working fine on my Iphone. Tried Demo which is 2 years old, works good except ImageTracking scene. Detail in https://github.com/juicycleff/flutter-unity-arkit-demo/issues/13#issue-950250180
Unity 2021.1.15f1 IOS flutter_unity_widget: ^4.2.1 $ flutter doctor -v [✓] Flutter (Channel dev, 2.3.0-12.1.pre, on Mac OS X 10.15.4 19E287 darwin-x64, locale zh-Hans) • Flutter version 2.3.0-12.1.pre at /Users/jack/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision f9c825981c (9 weeks ago), 2021-05-18 14:07:52 -0700 • Engine revision 26e217e6c3 • Dart version 2.14.0 (build 2.14.0-edge.a527411e5100a0a4f48c4009087a1b988aa784af) • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3) • Android SDK at /Users/jack/Library/Android/sdk • Platform android-30, build-tools 29.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.1, Build version 12A7403 • CocoaPods version 1.10.1
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.6) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 45.1.1 • Dart plugin version 192.7761 • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] VS Code (version 1.58.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.24.0
[✓] Connected device (2 available) • 吴杰的 iPhone7 (mobile) • eed6e3b2d815420621d441672707634130e89e16 • ios • iOS 13.5.1 • Chrome (web) • chrome • web-javascript • Google Chrome 83.0.4103.61 ! Error: 吴杰的 iPhone7 is busy: Copying cache files from device. Xcode will continue when 吴杰的 iPhone7 is finished. (code -10)
• No issues found!
$ flutter run
Launching lib/main.dart on 吴杰的 iPhone7 in debug mode... Automatically signing iOS for device deployment using specified development team in Xcode project: 65TSJ9E93J Running pod install... 1,768ms Running Xcode build...
└─Compiling, linking and signing... 9.6s Xcode build done. 34.1s iOS Observatory not discovered after 30 seconds. This is taking much longer than expected... Installing and launching... 72.5s Syncing files to device 吴杰的 iPhone7... 114ms
Flutter run key commands. r Hot reload. 🔥🔥🔥 R Hot restart. h List all available interactive commands. d Detach (terminate "flutter run" but leave application running). c Clear the screen q Quit (terminate the application on the device).
Running with unsound null safety For more information see https://dart.dev/null-safety/unsound-null-safety
An Observatory debugger and profiler on 吴杰的 iPhone7 is available at: http://127.0.0.1:58860/PFxqhe5EXTc=/ [VERBOSE-2:profiler_metrics_ios.mm(203)] Error retrieving thread information: (os/kern) invalid argument Activating Dart DevTools... 7.5s The Flutter DevTools debugger and profiler on 吴杰的 iPhone7 is available at: http://127.0.0.1:9101?uri=http%3A%2F%2F127.0.0.1%3A58860%2FPFxqhe5EXTc%3D%2F Built from '2021.1/china_unity/release' branch, Version '2021.1.15f1c1 (53017094f33d)', Build type 'Release', Scripting Backend 'il2cpp' MemoryManager: Using 'Default' Allocator. -> applicationDidFinishLaunching()
Setting UIViewControllerBasedStatusBarAppearance to NO is no longer supported. Apple actively discourages that, and all application-wide methods of changing status bar appearance are deprecated
-> applicationWillEnterForeground() -> applicationDidBecomeActive() [Subsystems] Discovering subsystems at path /var/containers/Bundle/Application/2EBA3131-A1EF-4E84-86F2-2EF077F4CC03/Runner.app/Frameworks/UnityFramework.framework/Data/UnitySubsystems [Subsystems] No descriptors matched for examples in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json. [Subsystems] 1 'inputs' descriptors matched in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json [Subsystems] No descriptors matched for displays in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json. [Subsystems] 1 'meshings' descriptors matched in UnitySubsystems/UnityARKit/UnitySubsystemsManifest.json GfxDevice: creating device client; threaded=1; jobified=0 Initializing Metal device caps: Apple A10 GPU Initialize engine version: 2021.1.15f1c1 (53017094f33d) flutter: flutter: flutter unity controller setup complete flutter: XRGeneral Settings awakening... UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object) UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[]) UnityEngine.Logger:Log(LogType, Object) UnityEngine.Debug:Log(Object) UnityEngine.XR.Management.XRGeneralSettings:Awake()
[Subsystems] Loading plugin UnityARKit for subsystem ARKit-Input... [Subsystems] UnityARKit successfully registered Provider for ARKit-Input [Subsystems] Loading plugin UnityARKit for subsystem ARKit-Meshing... [Subsystems] Failed to initialize subsystem ARKit-Meshing [error: 1] UnloadTime: 4.576666 ms [General] No resource group with name "ReferenceImageLibrary_0D75963B-ACC4-974A-9BC3-CE6A5DE9A3D7" found InvalidOperationException: Failed to resolve image library 'ReferenceImageLibrary'. There is no matching resource group, or the resource group does not contain any reference images. at UnityEngine.XR.ARKit.ARKitImageDatabase..ctor (UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary serializedLibrary) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.XR.ARKit.ARKitImageTrackingSubsystem+ARKitProvider.CreateRuntimeLibrary (UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary serializedLibrary) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.XR.ARSubsystems.XRImageTrackingSubsystem.CreateRuntimeLibrary (UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary serializedLibrary) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.XR.ARFoundation.ARTrackedImageManager.OnBeforeStart () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.XR.ARFoundation.SubsystemLifecycleManager
3[TSubsystem,TSubsystemDescriptor,TProvider].OnEnable () [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.XR.ARFoundation.ARTrackableManager
5[TSubsystem,TSubsystemDescriptor,TProvider,TSessionRelativeData,TTrackable].OnEnable () [0x00000] in <00000000000000000000000000000000>:0UnityARKit: Updating ARSession configuration with <ARWorldTrackingConfiguration: 0x281721740 worldAlignment=Gravity lightEstimation=Disabled frameSemantics=None videoFormat=<ARVideoFormat: 0x28014c960 imageResolution=(1920, 1440) framesPerSecond=(60)> autoFocus=Enabled environmentTexturing=None wantsHDREnvironmentTextures=Enabled planeDetection=None collaboration=Disabled userFaceTracking=Disabled sceneReconstruction=None>
Application finished.