public void Initialize() { if (initialized) { return; } // init save locatioon #if (UNITY_SWITCH && !UNITY_EDITOR) || SWITCH_DEV mountName = "save"; saveDataPath += mountName + ":/"; #else mountName = Application.persistentDataPath; saveDataPath += mountName + "/"; #endif #if (UNITY_SWITCH && !UNITY_EDITOR) || SWITCH_DEV // init player prefs which inits mounted save data PlayerPrefsSwitch.PlayerPrefsSwitch.Init(); nn.account.UserHandle userHandle = new nn.account.UserHandle(); PlayerPrefsSwitch.PlayerPrefsSwitch.GetUserHandle(ref userHandle); nn.account.Account.GetUserId(ref userId, userHandle); #endif initialized = true; }
private const int loadBufferSize = 1024; // 1 KB public void initialize() { nn.account.Account.Initialize(); nn.account.UserHandle userHandle = new nn.account.UserHandle(); nn.account.Account.OpenPreselectedUser(ref userHandle); nn.account.Account.GetUserId(ref userId, userHandle); // mount save data nn.Result result = nn.fs.SaveData.Mount(mountName, userId); //print out error (debug only) and abort if the filesystem couldn't be mounted if (result.IsSuccess() == false) { Debug.Log("Critical Error: File System could not be mounted."); result.abortUnlessSuccess(); } }
void Start() { nn.account.Account.Initialize(); nn.account.UserHandle userHandle = new nn.account.UserHandle(); nn.account.Account.OpenPreselectedUser(ref userHandle); nn.account.Account.GetUserId(ref userId, userHandle); nn.Result result = nn.fs.SaveData.Mount(mountName, userId); result.abortUnlessSuccess(); filePath = string.Format("{0}:/{1}", mountName, fileName); nn.hid.Npad.Initialize(); nn.hid.Npad.SetSupportedStyleSet(nn.hid.NpadStyle.Handheld | nn.hid.NpadStyle.JoyDual); nn.hid.Npad.SetSupportedIdType(npadIds); npadState = new nn.hid.NpadState(); }
void Start() { // textComponent = GameObject.Find("/Canvas/Text").GetComponent<UnityEngine.UI.Text>(); nn.account.Account.Initialize(); nn.account.UserHandle userHandle = new nn.account.UserHandle(); nn.account.Account.OpenPreselectedUser(ref userHandle); nn.account.Account.GetUserId(ref userId, userHandle); nn.Result result = nn.fs.SaveData.Mount(mountName, userId); result.abortUnlessSuccess(); filePath = string.Format("{0}:/{1}", mountName, fileName); Load(); nn.hid.Npad.Initialize(); nn.hid.Npad.SetSupportedStyleSet(nn.hid.NpadStyle.Handheld | nn.hid.NpadStyle.JoyDual); nn.hid.Npad.SetSupportedIdType(npadIds); npadState = new nn.hid.NpadState(); }
public static Result LoadIdTokenCache(ref ulong pOutActualSize, byte[] buffer, UserHandle handle) { return(NetworkServiceAccount.LoadIdTokenCache(ref pOutActualSize, buffer, buffer.Length, handle)); }
public static extern void CloseUser(UserHandle handle);
public static extern Result GetUserId(ref Uid pOut, UserHandle handle);
public static extern void CloseUser(UserHandle handle); // 0x00A0FDC0-0x00A0FDF0 public static extern Result GetUserId(ref Uid pOut, UserHandle handle); // 0x00A0FDF0-0x00A0FE30
public static extern bool TryOpenPreselectedUser(ref UserHandle pOutHandle);
public static extern Result GetId(ref NetworkServiceAccountId pOutId, UserHandle handle); // 0x00A10430-0x00A10470 public static Result EnsurIdTokenCacheAsync(AsyncContext pOutContext, UserHandle handle) => default; // 0x00A10470-0x00A104B0
public static extern Result EnsurIdTokenCacheAsync(IntPtr pOutContext, UserHandle handle); // 0x00A104B0-0x00A104F0 public static Result LoadIdTokenCache(ref ulong pOutActualSize, byte[] buffer, UserHandle handle) => default; // 0x00A104F0-0x00A10550
public static Result EnsureAvailable(UserHandle handle) { return(new Result()); }
public static extern Result EnsureAvailable(UserHandle handle); // 0x00A103B0-0x00A103F0 public static extern Result IsAvailable(ref bool pOut, UserHandle handle); // 0x00A103F0-0x00A10430
public static Result EnsurIdTokenCacheAsync(AsyncContext pOutContext, UserHandle handle) { return(NetworkServiceAccount.EnsurIdTokenCacheAsync(pOutContext._context, handle)); }
public static Result IsAvailable(ref bool pOut, UserHandle handle) { pOut = false; return(new Result()); }
public static extern Result IsAvailable([MarshalAs(UnmanagedType.U1)] ref bool pOut, UserHandle handle);
public static extern Result EnsureAvailable(UserHandle handle);
public static Result LoadIdTokenCache(ref ulong pOutActualSize, byte[] buffer, UserHandle handle) { pOutActualSize = 0; return(new Result()); }
public static Result EnsurIdTokenCacheAsync(AsyncContext pOutContext, UserHandle handle) { return(new Result()); }
public static Result GetId(ref NetworkServiceAccountId pOutId, UserHandle handle) { return(new Result()); }
public static Result OpenUser(ref UserHandle pOutHandle, Uid user) { return(new Result()); }
public static bool TryOpenPreselectedUser(ref UserHandle pOutHandle) { return(true); }
} // 0x00A105C0-0x00A105D0 // Methods public static extern Result EnsureAvailable(UserHandle handle); // 0x00A103B0-0x00A103F0
public static void CloseUser(UserHandle handle) { }
public static extern Result IsAvailable(ref bool pOut, UserHandle handle); // 0x00A103F0-0x00A10430 public static extern Result GetId(ref NetworkServiceAccountId pOutId, UserHandle handle); // 0x00A10430-0x00A10470
public static Result GetUserId(ref Uid pOut, UserHandle handle) { return(new Result()); }
public static Result EnsurIdTokenCacheAsync(AsyncContext pOutContext, UserHandle handle) => default; // 0x00A10470-0x00A104B0 public static extern Result EnsurIdTokenCacheAsync(IntPtr pOutContext, UserHandle handle); // 0x00A104B0-0x00A104F0
public static extern Result OpenUser(ref UserHandle pOutHandle, Uid user);
public static Result LoadIdTokenCache(ref ulong pOutActualSize, byte[] buffer, UserHandle handle) => default; // 0x00A104F0-0x00A10550 private static extern Result LoadIdTokenCache(ref ulong pOutActualSize, byte[] buffer, int bufferSize, UserHandle handle); // 0x00A10550-0x00A10590
public static extern Result ListQualifiedUsers(ref int pOutActualLength, Uid[] outUsers, int arrayLength); // 0x00A0FD90-0x00A0FDC0 public static extern void CloseUser(UserHandle handle); // 0x00A0FDC0-0x00A0FDF0