Steps:
- Import the package/files.
- Navigate to
EasyPlayfab > Settings
. - Set your 'app id' and 'app secret' in the settings from your oculus dashboard.
- Press 'Validate Cloudscript' (assuming you've logged into your title).
- Once validation is complete, press 'Rule Tutorial' and follow the provided steps.
The package offers a range of features, including:
- API spam prevention.
- Modding detection (working, bypassable with harmonypatch).
- Oculus user validation.
- Secure API features (currency modification, IAP, item granting).
- Most of the PlayFab API features, made easier.
- Returns the users PlayFab Id (string)
- Returns the users Oculus username (string)
- Returns the users Oculus displayname (string)
- Returns the users Oculus userId (string)
- Returns the users Oculus profile image link (string)
- Returns if the user is logged into playfab (bool)
- Use this when making a raw playfab api call (raw meaning something thats not in the EasyUsages because it does this automatically.)
- This property retrieves the current friend list for the local user.
- Adds the PlayFab user, based on the
targetPlayfabId
, to the friend list of the local user.
Example:
EasyUsages.EasyPlayfab.Friends.AddFriend("TargetPlayerID");
- Removes a specified user from the friend list of the local user.
Example:
EasyUsages.EasyPlayfab.Friends.RemoveFriend("TargetPlayerID");
- Updates the tag list for a specified user in the friend list of the local user.
Example:
EasyUsages.EasyPlayfab.Friends.SetFriendTag("TargetPlayerID", "tag1", "tag2");
- This property retrieves the user's owned items.
- Adds the user's virtual currency.
If PlayerID
is null then it will effect the local player.
Example:
EasyUsages.EasyPlayfab.PlayerItemManagement.AddUserVirtualCurrency(100, "BN", "PlayerID");
public static void SubtractUserVirtualCurrency(int amount, string currencyCode, string playfabId = "")
- Subtracts the user's virtual currency.
If PlayerID
is null then it will effect the local player.
Example:
EasyUsages.EasyPlayfab.PlayerItemManagement.SubtractUserVirtualCurrency(50, "BN", "PlayerID");
- Grants a PlayFab item to the player.
If PlayerID
is null then it will effect the local player.
Example:
EasyUsages.EasyPlayfab.PlayerItemManagement.GrantItemToPlayer("ItemID123", "CatalogVersion", "PlayerID");
- This property gets or sets the user's PlayFab username.
- This property retrieves the user's owned PlayFab items.
- This property retrieves the user's data.
- Updates the user's data.
Example:
Dictionary<string, string> data = new Dictionary<string, string>
{
{ "Key1", "Value1" },
{ "Key2", "Value2" }
};
List<string> keysToRemove = new List<string> { "KeyToRemove" };
EasyUsages.EasyPlayfab.PlayerDataManagement.UpdateUserData(data, keysToRemove);
- This property retrieves the title's catalog items.
- This property retrieves the title's data.
- This property retrieves the title's news items.
- This action is triggered when a purchase is completed. Use this to grant currency etc
void Start(){
//subscribe to event
EasyUsages.OculusUsages.IAP.OnPurchase += OnPurchase;
}
void OnPurchase(){
//triggered when purchase was completed
}
- Purchase an Oculus SKU securely.
Example:
EasyUsages.EasyOculus.IAP.PurchaseSKU("YourSKU");
- Retrieves the ID for each Achievement unlocked by the user.
- Unlocks an Achievement depending on the Identifer
Example:
EasyAchievements.Achieve("Identifier");
- Adds a count to the achievement
Example:
EasyAchievements.AddCount("Identifier", 1);
- Adds a field to the achievement
Example:
EasyAchievements.AddFields("Identifier", "field");
More will come in the future, join the Discord to get updates or get future packages
JokerJosh - Creating the package
Monosphere - Helped with protection against modding
Maximal - Testing the package and writing documentation