Android compute particles sample not working properly
There's an issue where the particle simulation on Android does not work properly on initial startup. It's probably due to invalid handling of the app life-cycle.
Current workaround to get the simulation running properly is to simply suspend and resume the sample. For example:
- Start the sample app
- Navigate to another app
- Navigate back to the sample app
Is there anything else to look out for? Can't seem to get any of the examples to run on my Nougat test device (which runs other non-Vulkan apps in Debug mode fine). It flashes the screen for a second and then closes. I tried putting breaks in OnCreate(0 and Initialize(), but doesn't get there. Navigating to another app and back doesn't help either. This is on VS17.
Are you testing on a physical device or emulator? If physical, which device more specifically?
Hey, yeah it's a physical device. Huawei Honor 8.
Output shows this in debug mode: Could not load assembly 'System.Runtime.CompilerServices.Unsafe' during startup registration.
@AdvKern Your phone should have the same GPU as my Galaxy S7 - Mali-T880. And I assume you are running Android 7.0+ which means hardware and software requirements are met.
I need to reinstall Xamarin tooling to test this on my phone. Will let you know in the upcoming days. Seems to be an issue with the Xamarin project definition according to your output.
Edit: Issue confirmed. Investigating ...
Edit 2: The fix doesn't seem to be as straightforward as I'd hoped. Seems to be an issue with the new .csproj format and especially how NuGet packages are handled. I'll have a second go at fixing it this week.
Edit 3: I opened a new issue https://github.com/discosultan/VulkanCore/issues/16 because this particular compute particles sample issue is unrelated.