Пример #1
0
    private string ProcessImdbResults(string jsonString)
    {
        JsonData  jsonvale = JsonMapper.ToObject(jsonString);
        parseJson parsejson;

        parsejson = new parseJson();

        Debug.Log("Json imdb Tag grabbed: " + jsonvale["imdb_id"]);

        Ray ray = cam.ScreenPointToRay(Input.mousePosition);

        if (Physics.Raycast(ray, out hit))
        {
            GameObject recipient = hit.transform.gameObject;
            Poster     posterObj = recipient.GetComponent <Poster>();

            Debug.Log("Running IMDB yield returns: " + jsonvale["imdb_id"].ToString());
            Debug.Log("posterObj=" + recipient.gameObject.ToString());
            Debug.Log("posterObj Title=" + posterObj.title);
            posterObj.ImdbReturn(jsonvale["imdb_id"].ToString());
        }
        else
        {
            Debug.LogWarning("Raycast check failed!!!");
        }
        return(jsonvale["imdb_id"].ToString());
    }