juicycleff / flutter-unity-view-widget

Embeddable unity game engine view for Flutter. Advance demo here https://github.com/juicycleff/flutter-unity-arkit-demo
BSD 3-Clause "New" or "Revised" License
2.14k stars 522 forks source link

failed assertion `indexCount(0) must be non-zero.' (iPhone) #291

Closed OGmetamonkey closed 3 years ago

OGmetamonkey commented 3 years ago

Describe the bug

Launching the app from XCode. Unity launches, starts the scripts and even passes a message but is locking up (white screen) the app with this error before displaying the scene: failed assertionindexCount(0) must be non-zero.'`

Expected behavior I expected the scene to render.

Device

Unity Version: 2019.3.14f1 Flutter Unity Widget Version: 0.1.6+8 XCode Version: 12.3

Log (Ignore the logs I have in for debug purposes)

2021-01-08 18:16:06.896846-0500 Runner[2055:329327] flutter: unity conditions CHECKED AND: loginpasstruenewpassfalseresetpasstrue CrashReporter: initialized 2021-01-08 18:16:06.898867-0500 Runner[2055:329110] Built from '2019.3/release' branch, Version '2019.3.14f1 (2b330bf6d2d8)', Build type 'Release', Scripting Backend 'il2cpp' 2021-01-08 18:16:06.900039-0500 Runner[2055:329327] flutter: -------------------------------------------- 2021-01-08 18:16:06.900432-0500 Runner[2055:329327] flutter: | Internal setup complete 2021-01-08 18:16:06.900778-0500 Runner[2055:329327] flutter: -------------------------------------------- 2021-01-08 18:16:06.901676-0500 Runner[2055:329327] flutter: Unity is created!! 2021-01-08 18:16:06.902106-0500 Runner[2055:329327] flutter: initiating unity messagesloginpasstruenewpassfalseresetpasstrue 2021-01-08 18:16:06.903054-0500 Runner[2055:329327] flutter: Sending loginpass variables from flutter.loginpasstruenewpassfalseresetpasstrue -> 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

-> applicationDidBecomeActive() GfxDevice: creating device client; threaded=1 Initializing Metal device caps: Apple A11 GPU Initialize engine version: 2019.3.14f1 (2b330bf6d2d8) CrashReporter: No pending report exists at /var/mobile/Containers/Data/Application/7CC25815-EAE9-46C8-BF68-06529C6FA3A4/Library/Caches/CrashReports/crash-pending.plcrash 2021-01-08 18:16:07.962981-0500 Runner[2055:329110] Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x1295ad430>. UnloadTime: 6.605458 ms AWAKE RUNS IPhonePlayer platform conditions fired RBFPC STARTING 750 x 1334 @ 60Hz 2021-01-08 18:16:10.303056-0500 Runner[2055:329327] flutter: Received message from unity: sending test string to flutter 2021-01-08 18:16:10.304136-0500 Runner[2055:329327] flutter: opening string: + sending test string to flutter adjust scene runs & loginTrigger: False clickdone: False phase2: False phase 3: False practice: False RigidbodyFirstPersonController.count: 0 RigidbodyFirstPersonController.entCount: 0 RigidbodyFirstPersonController.newCount: 0 ADJUST SCENE RUNS AND UNITY SETTERS: loginpass: resetpass: newpass: first time: 0 ADJUSTSCENELOGIN VALUES CHANGEDloginpass = resetpass = newpass = START RUNS handheld device = YES device type: Handheld login_Trigger (update func): False loginpass = newpass = resetpass = Recieved login variables from flutter.loginpass: true _MTLDebugValidateIndexBuffer:133: failed assertion `indexCount(0) must be non-zero.' (lldb)

UPDATE (1-12-21): Unchecking Auto graphics API, Removing "Metal" graphics API, and replacing it with OPENGLES3 fixed the indexCount(0) error.

OGmetamonkey commented 3 years ago

UPDATE (1-12-21): Unchecking Auto graphics API, Removing "Metal" graphics API, and replacing it with OPENGLES3 fixed the indexCount(0) error.