- Home /
Restart your Application via Script
Hi, I'm creating an app that has the option to change Anti Aliasing at run time. Unfortunately Unity has trouble doing this on Android and it causes huge errors likely related to not destroying and recreating the renderers. (I will create a separate Question on this)
So to avoid this I would like my application to quit upon changing Anti Aliasing and to reopen with the new Anti Aliasing settings.
Thanks in advance
Hmm, sorry about the previous answer. You were right. Thinking about it now fresh, if I were in Windows and out of options, I would try to run an external exe from within my game that kills the game and launches it again... I will seek other ideas as we speak.
Can you not simply do a
"Game must be restarted before AntiAliasing will take effect"
Like 75% of other game devs do? :)
no problem vexe :) that sounds like a good idea however like I said in my original post I'm running Android ;)
meat5000 no, but thanks for your input I guess?
As far as I am aware, there is no Unity functionality to restart an app. You may have to write an android plugin that will use android specific calls to force a restart
Answer by vexe · Sep 13, 2013 at 11:02 AM
Can't you do what most games do upon major settings change? - "Changes of X will not take effect till you restart the game" or something. - You can hack it, whenever the user changes the settings, don't overwrite what you have, store them in a suitable structure, when your game loads, load the settings that's in that structure (by default, let that structure at the beginning store your default settings) - maybe you could let that structure communicate with some XML - what say you?
thanks :)
(Saying it again so it doesn't look like I don't appreciate your response)
You're welcome! - Glad I gave you a useful idea, at least something you could work on.
Struggling to find a way of doing this :S Saving the settings in a suitable structure is fine But how would I tell Unity to use X settings before it creates it's GLContext ?
Not sure I got you. Could you elaborate more? You mean how could you tell unity what structure to use at the beginning?
I guess so? I mean I don't know how to tell it to do anything before a GameObject has been loaded so...
Your answer
Follow this Question
Related Questions
Scene not loading properly on android device? 0 Answers
Virtual reality apply music to different parts of the scene based on where user is looking at. 0 Answers
How do I Force Application to Quit if no internet connection available 1 Answer
GUI Layout 'Fading' on changing QualitySettings 1 Answer
How to log a finger move? 1 Answer