-
Notifications
You must be signed in to change notification settings - Fork 511
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
[ARKit] SwiftShot porting issues #4767
Comments
Unfortunately the sample doesn't build. It seems you forgot to commit some files. There should be a |
Hey,
|
@mykyta-bondarenko-gl can you clarify issue #1 please? Otherwise I guess we can consider this fixed (: |
Sorry for the delay. I made a small video of the issue. Hope you will understand what I meant. |
Watched the video. So it fails the first time and works the 2nd time. However I'm curious if you can try with the native sample because it doesn't look like a XI specific issue to me. ARKit requires you to move around the scene to detect feature points in order to attach AR objects to it. Since you didn't move I don't think you detected many feature points. You might want to try adding |
Also I had written before - I think that it happens because of some "long" operation. For ex. if I put |
@mykyta-bondarenko-gl and what happens if you do that with the native sample? |
@VincentDondain if I put |
@mykyta-bondarenko-gl Can you share private-samples/tree/swift-shot/ios12/SwiftShot project. I would like to see how Xamarin would re-implement this game as well as how to port it to Unity? |
Hi @VincentDondain
You can check it locally with the latest updates. Open Checked with: https://gist.github.com/mykyta-bondarenko-gl/7c8d7cd35be4fd1d9cf48fd0c4dc59a0 |
Ok we clarified the previous comment on slack. So indeed it seems that there is a big difference between the native and managed sample in "Delegate" time spent (Render Debug Window) which seems to be mainly caused by: https://github.com/xamarin/private-samples/blob/swift-shot/ios12/SwiftShot/SwiftShot/Core/Gameplay%20State/Components/RemoveWhenFallenComponent.cs#L23 Here's a screenshot of the render debug window of the native sample, with the world position code still in place: I did some profiling (Device|Release) and here are the results: I see the same Otherwise there's a bit of time spent in Not 100% what this is related to in the code (I have some guesses but I'm not sure). Invoking @rolfbjarne for to explain both performance diagnostics. |
Instruments trace: SwiftShotCSharp.trace.zip |
@VincentDondain can you try my issue-4936 branch and check if the performance is better? |
@rolfbjarne will try. @radrad we'll push the sample to https://github.com/xamarin/ios-samples when it's ready. The repo you're mentioning is our private repo with samples that are in progress (: |
@rolfbjarne yea looks much better! |
@mykyta-bondarenko-gl So the only remaining issue here is the disappearing scene when debugging. @mykyta-bondarenko-gl can you still reliably reproduce that with stable (or/and dogfood) builds? Could you run instruments on the app when you trigger the issue (maybe we'll see something obvious there)? |
The master branch now has all the performance fixes for #4936. |
@rolfbjarne Do you play to publish swiftshot xamarin version soon? What exactly will be the path to that sample? |
@radrad we are currently still validating the sample (it's a big one) and @mykyta-bondarenko-gl might be able to give you more info about when it will be released. When done it will be in https://github.com/xamarin/ios-samples. Also @mykyta-bondarenko-gl I discussed with Sebastien today and we believe that the debugger issue can be due to our soft debugger but there isn't much we can do about it. The debug mode isn't optimized (compared to release for instance, that can explain some of the slowness) and the soft debugger requires extra work that a hard debugger doesn't require (compared to natif). Given that we've addressed the other issues reported here, since I cannot reproduce the debugger issue and since it's not a problem with the SDK/bindings or something that would affect apps published to the store I'll close this issue (: |
Hi @radrad, it's under documentation team review already. Hope it will be public soon. Thanks |
Thanks @VincentDondain. |
@radrad yes that's exactly when it will be, might be renamed (: |
@mykyta-bondarenko-gl Thanks a lot for great work. I noticed some things were not implemented (as noted in the code). Was this due to difficulty or no time? Is this game "almost" 100% equivalent in features and coding as SwiftShot? |
There's still at least 1 pending issue #4970 we need time to get to that (there are more pressing things). Otherwise I don't know what exactly you're referring to, this game is definitely equivalent to the native sample (: |
The original sample: https://developer.apple.com/documentation/arkit/swiftshot_creating_a_game_for_augmented_reality
Ported sample: https://github.com/xamarin/private-samples/tree/swift-shot/ios12/SwiftShot
The main 2 problems now:
The text was updated successfully, but these errors were encountered: