RequestEncryptedAppTicket won't respond
void Start()
{
if (!SteamManager.Initialized)
{
Debug.LogError("Steam not initialized");
return;
}
ticketResponseCallback = Callback<EncryptedAppTicketResponse_t>.Create(OnEncryptedAppTicketResponse);
}
private void Update()
{
SteamAPI.RunCallbacks();
}
void RequestTicket()
{
byte[] optionalData = new byte[0]; // If you want to pass any custom data into the ticket
var requested = SteamUser.RequestEncryptedAppTicket(optionalData, optionalData.Length);
Debug.Log("RequestEncryptedAppTicket sent: " + requested);
}
void OnEncryptedAppTicketResponse(EncryptedAppTicketResponse_t callback)
{
Debug.Log("Respond received!");
//some code here
}
I receive this log: RequestEncryptedAppTicket sent: /Somenumber here/ But I never see Respond received in logs. OnEncryptedAppTicketResponse callback is not calling. What are the possible issues here?
it seems I was setting callback wrong
OnEncryptedAppTicketResponseCallResult = CallResult<EncryptedAppTicketResponse_t>.Create(OnEncryptedAppTicketResponse);
and set the handle
SteamAPICall_t handle = SteamUser.RequestEncryptedAppTicket(userData, userDataLength);
if (handle == SteamAPICall_t.Invalid)
{
Debug.LogError("RequestEncryptedAppTicket failed to initiate. Is Steam running/initialized properly?");
return;
}
OnEncryptedAppTicketResponseCallResult.Set(handle);
Now if I test this for SpaceWar it works. But when I set the steam_appid.txt to my game it will directly returnFailed to get encrypted ticket. Result: k_EResultFailwithout sending to backend.
I've been having the same problem - every time I get a failure when requesting the app ticket. Does anyone out there have this working?