I would like to use Android native UI(Button) to switch the Unity scene, but I have some problems.
it is this way,Unity has two scene,the scene1 is loaded with Android native UI,scene2 is ordinary scenes,the demand is Click the button in the native UI(in scene1),prompting the user is switching the scene(a native Dialog),after the switch is successful, native UI off,the problem is that it only pops Dialog,no switching scene,code is as follows ![alt text][1] alt text the script on scene1 void Start () { if (Application.platform == RuntimePlatform.Android) { Tools.getInstance.open (); Debug.Log ("----open---"); } }
private void MethodName (string str)
{
if (str.Equals ("change")) {
Debug.Log ("----str---" + str);
Application.LoadLevel (1);
}
}
the script on scene2 void Start () { if (Application.platform == RuntimePlatform.Android) { Tools.getInstance.close (); Debug.Log ("----close---"); } } [1]: /storage/temp/55877-屏幕快照-2015-10-10-下午21501.png
Your answer
Follow this Question
Related Questions
Multiplayer-network 0 Answers
(Android)Client Network performance on Release(Slow) and Development build(Fast) 0 Answers
How I use network for mobile 0 Answers
Send variables from client to server 0 Answers
TCP/IP Unity Android ERROR Helfe 1 Answer