Exemplo n.º 1
0
    public void ListContainerImages()
    {
        ShowLoader();
        PlayFabMultiplayerAPI.ListContainerImages(new ListContainerImagesRequest(),
                                                  result => {
            HideLoader();
            Debug.Log("GOT IMAGES OK: " + result.ToJson().ToString());
            foreach (var container in result.Images)
            {
                GameObject newContainerButton = Instantiate(containerButton,
                                                            Vector3.zero, Quaternion.identity,
                                                            containerButton.transform.parent) as GameObject;

                ContainerID identity   = newContainerButton.GetComponent <ContainerID>();
                identity.containerName = container;
                identity.text.text     = container;
                newContainerButton.SetActive(true);
            }
            containerWindow.SetActive(true);
        },
                                                  error => {
            HideLoader();
            Inform("GET IMAGES FAILED: " + error.ErrorMessage);
            Debug.LogError("GET IMAGES FAILED: " + error.ToString());
        });
    }