Exit is obsolete #8188
carljohansen
started this conversation in
iOS / iPadOS
Replies: 1 comment
-
MonoGame makes the opposite assumption: it is designed to be the main protagonist, and other scenarios should not be expected to work. (Android should also enforce that since it has also been a requirement for a while now.) I don't know MAUI enough, but when embedding MonoGame into a from-based GUI toolkit, you want to have it running on a component that is always active, and the UI components are built on top of it. I understand it doesn't fit your assumption, but that's where things are. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm developing a mobile app where I use MG for the 3D part and .NET Maui for all the other screens. When I did the Android version it was pretty easy: I start in the Maui world and from there I create an Activity to launch MG when the user asks for it. When they are finished with the 3D page I call
Game.Exit
to close MG and return to the Maui page. They can of course go around again and start another MG instance.Why can't I do the same thing in iOS? I'm blocked by the "Exit is obsolete" design of MG iOS. From the documentation I have found, it sounds like this is in place to prevent me from exiting the app programmatically. But that assumes that I am using MG for 100% of my app, which is not a reasonable assumption (see above).
My understanding is that the iOS equivalent of
Activity
isUIViewController
, so what I want to do is somehow switch control back from MG to aUIViewController
. I would also like to destroy the MG instance, otherwise the memory footprint will explode as the user keeps going around, however I could probably figure out a way to re-use the MG instance. The main issue is how to return control to Maui.Beta Was this translation helpful? Give feedback.
All reactions