Hello all,
I need to fire off my Unity game from a webpage. I have it starting up fine, but I need to be able to pass data to the game. I am using this for a test link:
<a href="testuri://This=That">click me!</a>
In my Start() function, I am doing this:
var mActivity = new AndroidJavaClass("com.unity3d.player.UnityPlayer").GetStatic.<AndroidJavaObject>("currentActivity");
var mIntent = mActivity.Call.<AndroidJavaObject>("getIntent");
var sAction = mIntent.Call.<String>("getAction");
That code gets called with no errors, but when I try to print out the contents of sAction, it comes back as an Object instead of a string, and I don’t know what to do. I have been searching quite a while on this, but can’t find a solution. Can anyone give me a clue what I am missing? Thank you!!