playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mikeaillen

Pages: [1]
1
PlayMaker Help / PlayFab + P-Vue (array type, object type)
« on: November 02, 2018, 06:54:13 PM »
I'm trying to connect the playfab through the play market
I already managed to connect and register players
Now about the bad:
I downloaded the P-Vue asset, the author says that these scripts are completely working.
But alas, when I try to get a list of items, I don’t see anything in the VARIABLES tab, and in the STATE array it is only commas.

here is the script that does the loading of directories
Code: [Select]
#if !DISABLE_PLAYFABCLIENT_API && PVUE_PLAYMAKER_ENABLED && PLAYFAB_SDK_AVAILABLE_FOR_PVUE

using System;
using System.Collections;
using UnityEngine;
using PlayFab;
using PlayFab.ClientModels;

namespace HutongGames.PlayMaker.Actions{

[ActionCategory("P-VUE (PlayFab Visual Unity Extensions) - Client")]
[Tooltip("Retrieves the specified version of the title's catalog of virtual goods, including all defined properties.")]

public class PVUEActionsClientGetCatalogItems : FsmStateAction{

[ActionSection("Request Properties")]
[Tooltip("Name of catalog being requested.")]
public FsmString catalogVersion;

[ActionSection("Response Properties")]
[UIHint(UIHint.Variable)]
[Tooltip("User statistics for the requested user. (Read Only)")]
[ArrayEditor(typeof(JrDevAssets.ClientModels.CatalogItem))]
public FsmArray catalog;

[ActionSection("Miscellaneous Properties")]
[Tooltip("Gets the error string fired.")]
public FsmString error;

[Tooltip("Turn on the provide the debug info.")]
public bool log;

[Tooltip("Fire this event when a Login error is received.")]
public FsmEvent errorEvent;

public override void OnEnter(){

GetCatalogItemsRequest request = new GetCatalogItemsRequest(){
CatalogVersion = catalogVersion.Value
};

PlayFabClientAPI.GetCatalogItems(request, (result) => {

var catalogItemWrapper = new JrDevAssets.ClientModels.CatalogItem[result.Catalog.Count];

for(int i = 0; i < result.Catalog.Count; i++){

catalogItemWrapper[i] = ScriptableObject.CreateInstance<JrDevAssets.ClientModels.CatalogItem>();
catalogItemWrapper[i].catalogItem = result.Catalog[i];

}

catalog.Values = catalogItemWrapper;

if(log){

Debug.Log("PVUELog - Getting Catalog Items was successful (Client)!");

}

Finish();

},(errorCall) => {

Debug.Log("PVUELog - There was an error Getting Catalog Items (Client)! The error is: '" + errorCall.Error + "'!");

error.Value = errorCall.Error.ToString();

Fsm.Event(errorEvent);

});

}

}

}

#endif



I'm at a dead end! Help!
The created array has type "object" object type "catalogitem"

Pages: [1]