Hi Guys,
Pretty much in the question. I have this:
public IEnumerator Execute(Action<ScenarioGroup> response)
{
yield return request.Send();
var output = JsonUtility.FromJson<ScenarioGroup>(request.downloadHandler.text);
response(output);
}
I’d like to convert it to this:
public IEnumerator Execute(UnityEngine.Object someType, Action<UnityEngine.Object> response)
{
yield return request.Send();
var output = JsonUtility.FromJson<someType.GetType()>(request.downloadHandler.text);
response(output);
}
Keep in mind I know the second one has no chance of working right now, but hopefully you get the gist of what I’m trying to achieve: Make it so it’s not a fixed class, but will return whatever class type you request in the parameters of the coroutine.
Any thoughts?