Skip to main content
Version: 6.0.0

HasReturnValue

public bool HasReturnValue();
public bool HasReturnValue(out string jsonString);

Parameter

ValueTypeDescription
jsonStringstring(Optional) If returnValue exists, it assigns returnValue to the passed argument.

Description

Checks whether returnValue exists in the BackndReturnObject object returned as a result of the request made to the server.
returnValue only exists if the request was successful.

Example

var bro = Backnd.Player.GetMyPlayerInfo();

string jsonString = null;
if(bro.HasReturnValue()) {
jsonString = bro.GetReturnValue();
Debug.Log(jsonString);
}

if(bro.HasReturnValue(out jsonString)) {
Debug.Log(jsonString);
}

Return casess

When the returnValue exists
return : true
jsonString : returnValue

When the returnValue does not exist
return : false
jsonString : null