- Home /
Game Window running on Android
I think that's impossible, but I need to take this out of my mind.
I'm regulating some values to control the Android Accelerometer to config it on Android, but every change I need to build another project and import to the tablet.
Have a way to change the values on Unity, save and automatically run it on Android without build and install a new Version ? Like the Game window of the Unity. I need to have a preview to config the accelerometer without do a thousand of builds
Answer by Dreamora · May 13, 2013 at 08:49 PM
You can use the unity remote but that's only an option if you do not require plugins to work
Just keep in mind that the remote is not the true game, it then runs on the computer and the android only renders an image. But it's more than enough for gameplay testing and alike
For the native game experience you can not get around build and install as there is no other way to get native code onto the device (other engines with no native code but only interpreted script code can get around that at the price if running much slower all the time)
Answer by Bunny83 · May 13, 2013 at 09:01 PM
How about an option menu? Just add a simple GUI slider which adjusts the accelerometer.
//C#
float sensitivity = 1.0f;
void Start()
{
sensitivity = PlayerPrefs.GetFloat("sensitivity", 1.0f);
}
void OnGUI()
{
sensitivity = HorizontalSlider(new Rect(0,0,300,50),sensitivity, 0.1f, 10.0f);
}
void Update()
{
var acc = Input.acceleration * sensitivity;
// use it
}
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Unity AndroidBuild with UTF-8 C# Files 0 Answers
How do you test Android deployment ? 2 Answers
Android build time "Building list of referenced assemblies..." 0 Answers
Scene white after building 1 Answer