npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

com.phantomsxr.xrmodgameservices

v1.0.0-preview.10

Published

Take your game to the next level without having to worry about maintaining or scaling your back-end infrastructure. XRMOD-GS simplifies many game development tasks and challenges.

Downloads

626

Readme

XRMOD Game Services

Take your game to the next level without having to worry about maintaining or scaling your back-end infrastructure. XRMOD-GS simplifies many game development tasks and challenges.

[TOC]
Authentication
Voice
Leaderboard
Cloud Save

You must add LOCATION_CHINA to defines when you in China and installed our custom UGS packages.


Authentication

How to use?

if using it with special platform: Apple/Google/Meta etc, you must add define for you Unity Project.

About Credential

[System.Serializable]
public class Credential
{
    public string Token;
    public string Name;
    public string Email;
    public string AvatarUrl;
}

Apple platform has not provide avatar, so avatar url will empty.

SignIn

Custom UserName with Password

Method

 public static void SignInUserNameWithPassword(String _userName,String _pwd);
 public static void SignUpUserNameWithPassword(String _userName,String _pwd);
 public static void UpdateUserNamePassword(String _userName,String _pwd);

Example

 AuthenticationManager.SignUpUserNameWithPassword("XRMODUser","XRMOD@User");
 AuthenticationManager.SignInUserNameWithPassword("XRMODUser","XRMOD@User");
 AuthenticationManager.UpdateUserNamePassword("XRMODUser","XRMOD@User");

Apple platform

  1. Add USE_APPLE_AUTHENTICATION to your project setting
  2. Call AuthenticationManager.SignInWithApple to signin

Method

 public static void SignInWithApple(Action<Credential> _signSuccess = null,Action<string> _signFailed = null);

Example

AuthenticationManager.SignInWithApple(_credential=>{},Debug.LogError);

Google platform

  1. Add USE_Google_AUTHENTICATION to your project setting
  2. Call AuthenticationManager.SignInWithGoogle to signin

Method

 public static void SignInWithGoogle(Action<Credential> _signSuccess = null,Action<string> _signFailed = null);

Example

AuthenticationManager.SignInWithGoogle(_credential=>{},Debug.LogError);

Meta platform

  1. Add USE_META_AUTHENTICATION to your project setting
  2. Call AuthenticationManager.SignInWithMeta to signin

Method

 public static void SignInWithMeta(Action<Credential> _signSuccess = null,Action<string> _signFailed = null);

Example

AuthenticationManager.SignInWithMeta(_credential=>{},Debug.LogError);

SignInWithAnonymous

Method

public static async Task SignInWithAnonymous()

Example

AuthenticationManager.SignInWithAnonymous();

SignOut

Nothing special needs to be done, just call AuthenticationManager.SignOut()

GetUserInfo

Nothing special needs to be done, just call AuthenticationManager.GetUserInfo()

SignIn or Authorize State

Nothing special needs to be done, just call

  • AuthenticationManager.IsSignedIn
  • AuthenticationManager.IsAuthorized
  • AuthenticationManager.IsExpired

Voice

With Voice as your communication platform, you can offer cross-platform communications to your players and scale seamlessly as you grow.

How to use?

You must Add USE_XXXX define to your project config of Unity. And must installed Authentication System.

  • Vivox -> USE_VIVOX
  • Agora -> USE_AGORA_RTC
  • PHOTON -> USE_PHOTON_VOICE

Event Callback

You can register event callbacks with ActionNotificationCenter and use the VoiceEventKey in NotificationData to identify the event type.

  • ActionNotificationCenter.DefaultCenter.AddObserver(OnVoiceEvent, VoiceModuleNotifyActionKey.CONST_VOICE_EVENT_KEY);
  • Convert BaseNotificationData to voiceNotificationDataArgs in OnVoiceEvent function.

Example

void Start(){
    ActionNotificationCenter.DefaultCenter.AddObserver(OnVoiceEvent,
  VoiceModuleNotifyActionKey.CONST_VOICE_EVENT_KEY);
}

void OnVoiceEvent(BaseNotificationData _data){
 if (_data is VoiceNotificationDataArgs tmp_VoiceNotification){
       switch (tmp_VoiceNotification.VoiceEventKey){
            //....    
       }
 }    
}

APIs

  • Initialize(string _configuration,Voice3DProperties _voice3DProperties)
  • DeInitialize()
  • CreateVoiceChannel(string _channelName, JoinChannelType _joinChannelType)
  • JoinVoiceChannel(string _channelName, JoinChannelType _joinChannelType)
  • LeaveVoiceChannel()
  • MuteSelfMicrophone(bool _muted)
  • MuteOtherMicrophone(bool _muted, string _channelId, string _userId)
  • BlockUser(bool _block, string _channelId, string _userId)
  • List GetParticipants()

Leaderboard

XRMOD Leaderboard is an adaptation package for Unity Leaderboard.

How to use?

You must Add USE_UNITY_LEADERBOARD define to your project config of Unity. And must installed Authentication System.

APIs

Before calling the leaderboard API, you must first try the Authentication System for user login.

  • LeaderboardSystemManager.AddOrUpdateScore
  • LeaderboardSystemManager.GetScoreList
  • LeaderboardSystemManager.GetPlayerScore

CloudSave

How to use?

You must Add USE_UNITY_CLOUD_SAVE define to your project config of Unity. And must installed Authentication System.

APIs

Before calling the CloudSave API, you must first try the Authentication System for user login.

  • Task SavePlayerData(Dictionary<string, object> _saveData)
  • Task<Dictionary<string, Item>> LoadPlayerData(HashSet _keys)
  • void Delete(string _key)