I have integrated Unity in an Android activity (similar to this). I now need to dynamically load a scene depending on user input.
I've tried replicating how Unity loads a scene, in the only way that I know an Android Activity is able to communicate with the UnityPlayer, but obviously doesn't work:
UnityPlayer.UnitySendMessage("Application", "LoadLevel", "9");
I know there are other ways of loading a scene in Unity, but I don't know how to call those from Android itself (also consider that UnitySendMessage
only allows one parameter).