diff --git a/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/AxiNSPack/Editors/AxibugNSPTools.cs b/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/AxiNSPack/Editors/AxibugNSPTools.cs
index 0ff1826a..3212d652 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/AxiNSPack/Editors/AxibugNSPTools.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/AxiProjectTools/AxiNSPack/Editors/AxibugNSPTools.cs
@@ -101,7 +101,7 @@ namespace AxibugEmuOnline.Editors
#endif
string targetName = $"{Application.productName}_{titleid}.nsp";
- string _locationPathName = $"Output/NSPBuild/{targetName}";
+ string _locationPathName = $"Output/NSPBuild/{DateTime.Now.ToString("yyyyMMddHHmmss")}/{targetName}";
var options = new BuildPlayerOptions
{
scenes = levels.ToArray(),
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiNSApi/AxiNSIO.cs b/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiNSApi/AxiNSIO.cs
index 9ad3c4a9..031b1df6 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiNSApi/AxiNSIO.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Plugins/AxiNSApi/AxiNSIO.cs
@@ -7,20 +7,20 @@ using System.Text.RegularExpressions;
public class AxiNSIO
{
- string save_name => AxiNS.instance.mount.SaveMountName;
- public string save_path => $"{save_name}:/";
+ string save_name => AxiNS.instance.mount.SaveMountName;
+ public string save_path => $"{save_name}:/";
#if UNITY_SWITCH
- private FileHandle fileHandle = new nn.fs.FileHandle();
+ private FileHandle fileHandle = new nn.fs.FileHandle();
#endif
- static object commitLock = new object();
+ static object commitLock = new object();
- static bool bDirty = false;
+ static bool bDirty = false;
- bool CommitSave()
- {
- lock (commitLock)
- {
+ bool CommitSave()
+ {
+ lock (commitLock)
+ {
#if UNITY_SWITCH && !UNITY_EDITOR
// 阻止用户在保存时,退出游戏 Switch 条例 0080
@@ -39,242 +39,242 @@ public class AxiNSIO
bDirty = false;
return true;
#else
- return false;
+ return false;
#endif
- }
+ }
- }
+ }
- void SetCommitDirty()
- {
- lock (commitLock)
- {
- bDirty = true;
- }
- }
+ void SetCommitDirty()
+ {
+ lock (commitLock)
+ {
+ bDirty = true;
+ }
+ }
- public void ApplyAutoCommit()
- {
- bool temp;
- lock (commitLock)
- {
- temp = bDirty;
- }
+ public void ApplyAutoCommit()
+ {
+ bool temp;
+ lock (commitLock)
+ {
+ temp = bDirty;
+ }
- if (temp)
- {
- CommitSave();
- }
- }
+ if (temp)
+ {
+ CommitSave();
+ }
+ }
- ///
- /// 检查Path是否存在
- ///
- ///
- ///
- public bool CheckPathExists(string filePath)
- {
+ ///
+ /// 检查Path是否存在
+ ///
+ ///
+ ///
+ public bool CheckPathExists(string filePath)
+ {
#if !UNITY_SWITCH
return false;
#else
- nn.fs.EntryType entryType = 0;
- nn.Result result = nn.fs.FileSystem.GetEntryType(ref entryType, filePath);
- //result.abortUnlessSuccess();
- //这个异常捕获。真的别扭
+ nn.fs.EntryType entryType = 0;
+ nn.Result result = nn.fs.FileSystem.GetEntryType(ref entryType, filePath);
+ //result.abortUnlessSuccess();
+ //这个异常捕获。真的别扭
- //日,FileSystem.ResultPathAlreadyExists 貌似不太行
- //return nn.fs.FileSystem.ResultPathAlreadyExists.Includes(result);
- return !nn.fs.FileSystem.ResultPathNotFound.Includes(result);
+ //日,FileSystem.ResultPathAlreadyExists 貌似不太行
+ //return nn.fs.FileSystem.ResultPathAlreadyExists.Includes(result);
+ return !nn.fs.FileSystem.ResultPathNotFound.Includes(result);
#endif
- }
- ///
- /// 检查Path是否不存在
- ///
- ///
- ///
- public bool CheckPathNotFound(string filePath)
- {
+ }
+ ///
+ /// 检查Path是否不存在
+ ///
+ ///
+ ///
+ public bool CheckPathNotFound(string filePath)
+ {
#if !UNITY_SWITCH
return false;
#else
- nn.fs.EntryType entryType = 0;
- nn.Result result = nn.fs.FileSystem.GetEntryType(ref entryType, filePath);
- //这个异常捕获。真的别扭
- return nn.fs.FileSystem.ResultPathNotFound.Includes(result);
+ nn.fs.EntryType entryType = 0;
+ nn.Result result = nn.fs.FileSystem.GetEntryType(ref entryType, filePath);
+ //这个异常捕获。真的别扭
+ return nn.fs.FileSystem.ResultPathNotFound.Includes(result);
#endif
- }
- ///
- /// 创建目录,目录存在也会返回true
- ///
- ///
- ///
- public bool CreateDir(string filePath)
- {
- lock (commitLock)
- {
+ }
+ ///
+ /// 创建目录,目录存在也会返回true
+ ///
+ ///
+ ///
+ public bool CreateDir(string filePath)
+ {
+ lock (commitLock)
+ {
#if !UNITY_SWITCH
return false;
#else
- // 使用封装函数检查和创建父目录
- if (!EnsureParentDirectory(filePath, true))
- {
- UnityEngine.Debug.LogError($"无法确保父目录,文件写入取消: {filePath}");
- return false;
- }
- return true;
+ // 使用封装函数检查和创建父目录
+ if (!EnsureParentDirectory(filePath, true))
+ {
+ UnityEngine.Debug.LogError($"无法确保父目录,文件写入取消: {filePath}");
+ return false;
+ }
+ return true;
#endif
- }
- }
+ }
+ }
- ///
- /// 保存并创建文件(如果目录不存在回先自动创建目录)
- ///
- ///
- ///
- ///
- public bool FileToSaveWithCreate(string filePath, System.IO.MemoryStream ms)
- {
- return FileToSaveWithCreate(filePath, ms.ToArray());
- }
- ///
- /// 保存并创建文件(如果目录不存在回先自动创建目录)
- ///
- ///
- ///
- ///
- public AxiNSWait_FileToSaveByMSWithCreate FileToSaveWithCreateAsync(string filePath, System.IO.MemoryStream ms)
- {
- var wait = new AxiNSWait_FileToSaveByMSWithCreate(filePath, ms);
- AxiNS.instance.wait.AddWait(wait);
- return wait;
- }
+ ///
+ /// 保存并创建文件(如果目录不存在回先自动创建目录)
+ ///
+ ///
+ ///
+ ///
+ public bool FileToSaveWithCreate(string filePath, System.IO.MemoryStream ms)
+ {
+ return FileToSaveWithCreate(filePath, ms.ToArray());
+ }
+ ///
+ /// 保存并创建文件(如果目录不存在回先自动创建目录)
+ ///
+ ///
+ ///
+ ///
+ public AxiNSWait_FileToSaveByMSWithCreate FileToSaveWithCreateAsync(string filePath, System.IO.MemoryStream ms)
+ {
+ var wait = new AxiNSWait_FileToSaveByMSWithCreate(filePath, ms);
+ AxiNS.instance.wait.AddWait(wait);
+ return wait;
+ }
- ///
- /// 保存并创建文件(如果目录不存在回先自动创建目录)
- ///
- ///
- ///
- /// 是否立即Commit到物理存储
- ///
- public bool FileToSaveWithCreate(string filePath, byte[] data, bool immediatelyCommit = true)
- {
- lock (commitLock)
- {
+ ///
+ /// 保存并创建文件(如果目录不存在回先自动创建目录)
+ ///
+ ///
+ ///
+ /// 是否立即Commit到物理存储
+ ///
+ public bool FileToSaveWithCreate(string filePath, byte[] data, bool immediatelyCommit = true)
+ {
+ lock (commitLock)
+ {
#if !UNITY_SWITCH
return false;
#else
- if (!AxiNS.instance.mount.SaveIsMount)
- {
- UnityEngine.Debug.LogError($"Save 尚未挂载,无法存储 {filePath}");
- return false;
- }
+ if (!AxiNS.instance.mount.SaveIsMount)
+ {
+ UnityEngine.Debug.LogError($"Save 尚未挂载,无法存储 {filePath}");
+ return false;
+ }
- nn.Result result;
+ nn.Result result;
#if UNITY_SWITCH && !UNITY_EDITOR
// 阻止用户在保存时,退出游戏
// Switch 条例 0080
UnityEngine.Switch.Notification.EnterExitRequestHandlingSection();
#endif
- // 使用封装函数检查和创建父目录
- if (!EnsureParentDirectory(filePath, true))
- {
- UnityEngine.Debug.LogError($"无法确保父目录,文件写入取消: {filePath}");
- return false;
- }
+ // 使用封装函数检查和创建父目录
+ if (!EnsureParentDirectory(filePath, true))
+ {
+ UnityEngine.Debug.LogError($"无法确保父目录,文件写入取消: {filePath}");
+ return false;
+ }
- //string directoryPath = System.IO.Path.GetDirectoryName(filePath.Replace(save_path, ""));
- //string fullDirectoryPath = $"{save_path}{directoryPath}";
- //UnityEngine.Debug.Log($"检查父目录: {fullDirectoryPath}");
+ //string directoryPath = System.IO.Path.GetDirectoryName(filePath.Replace(save_path, ""));
+ //string fullDirectoryPath = $"{save_path}{directoryPath}";
+ //UnityEngine.Debug.Log($"检查父目录: {fullDirectoryPath}");
- //nn.fs.EntryType entryType = 0;
- //result = nn.fs.FileSystem.GetEntryType(ref entryType, fullDirectoryPath);
- //if (!result.IsSuccess() && nn.fs.FileSystem.ResultPathNotFound.Includes(result))
- //{
- // UnityEngine.Debug.Log($"父目录 {fullDirectoryPath} 不存在,尝试创建 (判断依据 result=>{result.ToString()})");
- // result = nn.fs.Directory.Create(fullDirectoryPath);
- // if (!result.IsSuccess())
- // {
- // UnityEngine.Debug.LogError($"创建父目录失败: {result.GetErrorInfo()}");
- // return false;
- // }
- // UnityEngine.Debug.Log($"父目录 {fullDirectoryPath} 创建成功");
- //}
- //else if (result.IsSuccess() && entryType != nn.fs.EntryType.Directory)
- //{
- // UnityEngine.Debug.LogError($"路径 {fullDirectoryPath} 已存在,但不是目录");
- // return false;
- //}
- //else if (!result.IsSuccess())
- //{
- // UnityEngine.Debug.LogError($"检查父目录失败: {result.GetErrorInfo()}");
- // return false;
- //}
+ //nn.fs.EntryType entryType = 0;
+ //result = nn.fs.FileSystem.GetEntryType(ref entryType, fullDirectoryPath);
+ //if (!result.IsSuccess() && nn.fs.FileSystem.ResultPathNotFound.Includes(result))
+ //{
+ // UnityEngine.Debug.Log($"父目录 {fullDirectoryPath} 不存在,尝试创建 (判断依据 result=>{result.ToString()})");
+ // result = nn.fs.Directory.Create(fullDirectoryPath);
+ // if (!result.IsSuccess())
+ // {
+ // UnityEngine.Debug.LogError($"创建父目录失败: {result.GetErrorInfo()}");
+ // return false;
+ // }
+ // UnityEngine.Debug.Log($"父目录 {fullDirectoryPath} 创建成功");
+ //}
+ //else if (result.IsSuccess() && entryType != nn.fs.EntryType.Directory)
+ //{
+ // UnityEngine.Debug.LogError($"路径 {fullDirectoryPath} 已存在,但不是目录");
+ // return false;
+ //}
+ //else if (!result.IsSuccess())
+ //{
+ // UnityEngine.Debug.LogError($"检查父目录失败: {result.GetErrorInfo()}");
+ // return false;
+ //}
- if (CheckPathNotFound(filePath))
- {
- UnityEngine.Debug.Log($"文件({filePath})不存在需要创建");
- result = nn.fs.File.Create(filePath, data.Length); //this makes a file the size of your save journal. You may want to make a file smaller than this.
- //result.abortUnlessSuccess();
- if (!result.IsSuccess())
- {
- UnityEngine.Debug.LogError($"创建文件失败 {filePath} : " + result.GetErrorInfo());
- return false;
- }
- //读取文件Handle
- result = File.Open(ref fileHandle, filePath, OpenFileMode.Write);
- }
- else
- {
- //读取文件Handle
- result = File.Open(ref fileHandle, filePath, OpenFileMode.Write);
- long currsize = 0;
- File.GetSize(ref currsize, fileHandle);
- if (currsize == data.Length)
- {
- UnityEngine.Debug.Log($"文件({filePath})存在,长度一致,不用重新创建");
- }
- else
- {
- UnityEngine.Debug.Log($"文件({filePath})存在,长度不一致,先删除再重建");
- nn.fs.File.Close(fileHandle);
- //删除
- File.Delete(filePath);
- //重新创建
- result = nn.fs.File.Create(filePath, data.Length);
- if (!result.IsSuccess())
- {
- UnityEngine.Debug.LogError($"创建文件失败 {filePath} : " + result.GetErrorInfo());
- return false;
- }
- //重新读取文件Handle
- result = File.Open(ref fileHandle, filePath, OpenFileMode.Write);
- }
- }
+ if (CheckPathNotFound(filePath))
+ {
+ UnityEngine.Debug.Log($"文件({filePath})不存在需要创建");
+ result = nn.fs.File.Create(filePath, data.Length); //this makes a file the size of your save journal. You may want to make a file smaller than this.
+ //result.abortUnlessSuccess();
+ if (!result.IsSuccess())
+ {
+ UnityEngine.Debug.LogError($"创建文件失败 {filePath} : " + result.GetErrorInfo());
+ return false;
+ }
+ //读取文件Handle
+ result = File.Open(ref fileHandle, filePath, OpenFileMode.Write);
+ }
+ else
+ {
+ //读取文件Handle
+ result = File.Open(ref fileHandle, filePath, OpenFileMode.Write);
+ long currsize = 0;
+ File.GetSize(ref currsize, fileHandle);
+ if (currsize == data.Length)
+ {
+ UnityEngine.Debug.Log($"文件({filePath})存在,长度一致,不用重新创建");
+ }
+ else
+ {
+ UnityEngine.Debug.Log($"文件({filePath})存在,长度不一致,先删除再重建");
+ nn.fs.File.Close(fileHandle);
+ //删除
+ File.Delete(filePath);
+ //重新创建
+ result = nn.fs.File.Create(filePath, data.Length);
+ if (!result.IsSuccess())
+ {
+ UnityEngine.Debug.LogError($"创建文件失败 {filePath} : " + result.GetErrorInfo());
+ return false;
+ }
+ //重新读取文件Handle
+ result = File.Open(ref fileHandle, filePath, OpenFileMode.Write);
+ }
+ }
- // //OpenFileMode.AllowAppend 好像不可用
- // //result = File.Open(ref fileHandle, filePath, OpenFileMode.AllowAppend);
- // result = File.Open(ref fileHandle, filePath, OpenFileMode.Write);
+ // //OpenFileMode.AllowAppend 好像不可用
+ // //result = File.Open(ref fileHandle, filePath, OpenFileMode.AllowAppend);
+ // result = File.Open(ref fileHandle, filePath, OpenFileMode.Write);
- //result.abortUnlessSuccess();
- if (!result.IsSuccess())
- {
- UnityEngine.Debug.LogError($"失败 File.Open(ref filehandle, {filePath}, OpenFileMode.Write): " + result.GetErrorInfo());
- return false;
- }
- UnityEngine.Debug.Log($"成功 File.Open(ref filehandle, {filePath}, OpenFileMode.Write)");
+ //result.abortUnlessSuccess();
+ if (!result.IsSuccess())
+ {
+ UnityEngine.Debug.LogError($"失败 File.Open(ref filehandle, {filePath}, OpenFileMode.Write): " + result.GetErrorInfo());
+ return false;
+ }
+ UnityEngine.Debug.Log($"成功 File.Open(ref filehandle, {filePath}, OpenFileMode.Write)");
- //nn.fs.WriteOption.Flush 应该就是覆盖写入
- result = nn.fs.File.Write(fileHandle, 0, data, data.Length, nn.fs.WriteOption.Flush); // Writes and flushes the write at the same time
- //result.abortUnlessSuccess();
- if (!result.IsSuccess())
- {
- UnityEngine.Debug.LogError("写入文件失败: " + result.GetErrorInfo());
- return false;
- }
- UnityEngine.Debug.Log("写入文件成功: " + filePath);
+ //nn.fs.WriteOption.Flush 应该就是覆盖写入
+ result = nn.fs.File.Write(fileHandle, 0, data, data.Length, nn.fs.WriteOption.Flush); // Writes and flushes the write at the same time
+ //result.abortUnlessSuccess();
+ if (!result.IsSuccess())
+ {
+ UnityEngine.Debug.LogError("写入文件失败: " + result.GetErrorInfo());
+ return false;
+ }
+ UnityEngine.Debug.Log("写入文件成功: " + filePath);
- nn.fs.File.Close(fileHandle);
+ nn.fs.File.Close(fileHandle);
#if UNITY_SWITCH && !UNITY_EDITOR
@@ -282,56 +282,56 @@ public class AxiNSIO
UnityEngine.Switch.Notification.LeaveExitRequestHandlingSection();
#endif
- if (immediatelyCommit)
- {
- //必须得提交,否则没有真实写入
- return CommitSave();
- }
- else
- {
- SetCommitDirty();
- return true;
- }
+ if (immediatelyCommit)
+ {
+ //必须得提交,否则没有真实写入
+ return CommitSave();
+ }
+ else
+ {
+ SetCommitDirty();
+ return true;
+ }
#endif
- }
- }
- ///
- /// 保存并创建文件(如果目录不存在回先自动创建目录)
- ///
- ///
- ///
- ///
- public AxiNSWait_FileToSaveWithCreate FileToSaveWithCreateAsync(string filePath, byte[] data)
- {
- var wait = new AxiNSWait_FileToSaveWithCreate(filePath, data);
- AxiNS.instance.wait.AddWait(wait);
- return wait;
- }
- public byte[] LoadSwitchDataFile(string filename)
- {
- byte[] outputData;
- LoadSwitchDataFile(filename, out outputData);
- return outputData;
- }
+ }
+ }
+ ///
+ /// 保存并创建文件(如果目录不存在回先自动创建目录)
+ ///
+ ///
+ ///
+ ///
+ public AxiNSWait_FileToSaveWithCreate FileToSaveWithCreateAsync(string filePath, byte[] data)
+ {
+ var wait = new AxiNSWait_FileToSaveWithCreate(filePath, data);
+ AxiNS.instance.wait.AddWait(wait);
+ return wait;
+ }
+ public byte[] LoadSwitchDataFile(string filename)
+ {
+ byte[] outputData;
+ LoadSwitchDataFile(filename, out outputData);
+ return outputData;
+ }
- public bool LoadSwitchDataFile(string filename, ref System.IO.MemoryStream ms)
- {
- byte[] outputData;
- if (LoadSwitchDataFile(filename, out outputData))
- {
- using (System.IO.BinaryWriter writer = new System.IO.BinaryWriter(ms))
- {
- writer.Write(outputData);
- }
- return true;
- }
- return false;
- }
- public bool LoadSwitchDataFile(string filename, out byte[] outputData)
- {
+ public bool LoadSwitchDataFile(string filename, ref System.IO.MemoryStream ms)
+ {
+ byte[] outputData;
+ if (LoadSwitchDataFile(filename, out outputData))
+ {
+ using (System.IO.BinaryWriter writer = new System.IO.BinaryWriter(ms))
+ {
+ writer.Write(outputData);
+ }
+ return true;
+ }
+ return false;
+ }
+ public bool LoadSwitchDataFile(string filename, out byte[] outputData)
+ {
#if !UNITY_SWITCH || UNITY_EDITOR
- outputData = null;
- return false;
+ outputData = null;
+ return false;
#else
outputData = null;
if (!AxiNS.instance.mount.SaveIsMount)
@@ -379,104 +379,104 @@ public class AxiNSIO
outputData = loadedData;
return true;
#endif
- }
- public AxiNSWait_LoadSwitchDataFile LoadSwitchDataFileAsync(string filename)
- {
- var wait = new AxiNSWait_LoadSwitchDataFile(filename);
- AxiNS.instance.wait.AddWait(wait);
- return wait;
- }
+ }
+ public AxiNSWait_LoadSwitchDataFile LoadSwitchDataFileAsync(string filename)
+ {
+ var wait = new AxiNSWait_LoadSwitchDataFile(filename);
+ AxiNS.instance.wait.AddWait(wait);
+ return wait;
+ }
- public bool GetDirectoryFiles(string path, out string[] entrys)
- {
+ public bool GetDirectoryFiles(string path, out string[] entrys)
+ {
#if !UNITY_SWITCH || UNITY_EDITOR
- entrys = null;
- return false;
+ entrys = null;
+ return false;
#else
return GetDirectoryEntrys(path,nn.fs.OpenDirectoryMode.File,out entrys);
#endif
- }
+ }
- public bool GetDirectoryDirs(string path, out string[] entrys)
- {
+ public bool GetDirectoryDirs(string path, out string[] entrys)
+ {
#if !UNITY_SWITCH || UNITY_EDITOR
- entrys = null;
- return false;
+ entrys = null;
+ return false;
#else
return GetDirectoryEntrys(path, nn.fs.OpenDirectoryMode.Directory, out entrys);
#endif
- }
+ }
#if UNITY_SWITCH
- public bool GetDirectoryEntrys(string path, nn.fs.OpenDirectoryMode type, out string[] entrys)
- {
- nn.fs.DirectoryHandle eHandle = new nn.fs.DirectoryHandle();
- nn.Result result = nn.fs.Directory.Open(ref eHandle, path, type);
- if (nn.fs.FileSystem.ResultPathNotFound.Includes(result))
- {
- UnityEngine.Debug.Log($"目录 {path} 不存在");
- entrys = null;
- return false;
- }
- long entryCount = 0;
- nn.fs.Directory.GetEntryCount(ref entryCount, eHandle);
- nn.fs.DirectoryEntry[] entries = new nn.fs.DirectoryEntry[entryCount];
- long actualEntries = 0;
- nn.fs.Directory.Read(ref actualEntries, entries, eHandle, entryCount);
+ public bool GetDirectoryEntrys(string path, nn.fs.OpenDirectoryMode type, out string[] entrys)
+ {
+ nn.fs.DirectoryHandle eHandle = new nn.fs.DirectoryHandle();
+ nn.Result result = nn.fs.Directory.Open(ref eHandle, path, type);
+ if (nn.fs.FileSystem.ResultPathNotFound.Includes(result))
+ {
+ UnityEngine.Debug.Log($"目录 {path} 不存在");
+ entrys = null;
+ return false;
+ }
+ long entryCount = 0;
+ nn.fs.Directory.GetEntryCount(ref entryCount, eHandle);
+ nn.fs.DirectoryEntry[] entries = new nn.fs.DirectoryEntry[entryCount];
+ long actualEntries = 0;
+ nn.fs.Directory.Read(ref actualEntries, entries, eHandle, entryCount);
- entrys = new string[actualEntries];
- for (int i = 0; i < actualEntries; i++)
- {
- entrys[i] = System.IO.Path.Combine(path, entries[i].name);
- }
- nn.fs.Directory.Close(eHandle);
- return true;
- }
+ entrys = new string[actualEntries];
+ for (int i = 0; i < actualEntries; i++)
+ {
+ entrys[i] = System.IO.Path.Combine(path, entries[i].name);
+ }
+ nn.fs.Directory.Close(eHandle);
+ return true;
+ }
#endif
- public bool GetDirectoryEntrysFullRecursion(string path, out string[] entrys)
- {
+ public bool GetDirectoryEntrysFullRecursion(string path, out string[] entrys)
+ {
#if UNITY_SWITCH
- nn.fs.DirectoryHandle eHandle = new nn.fs.DirectoryHandle();
- nn.Result result = nn.fs.Directory.Open(ref eHandle, path, OpenDirectoryMode.All);
- if (nn.fs.FileSystem.ResultPathNotFound.Includes(result))
- {
- UnityEngine.Debug.Log($"目录 {path} 不存在");
- entrys = null;
- return false;
- }
- long entryCount = 0;
- nn.fs.Directory.GetEntryCount(ref entryCount, eHandle);
- nn.fs.DirectoryEntry[] entries = new nn.fs.DirectoryEntry[entryCount];
- long actualEntries = 0;
- nn.fs.Directory.Read(ref actualEntries, entries, eHandle, entryCount);
+ nn.fs.DirectoryHandle eHandle = new nn.fs.DirectoryHandle();
+ nn.Result result = nn.fs.Directory.Open(ref eHandle, path, OpenDirectoryMode.All);
+ if (nn.fs.FileSystem.ResultPathNotFound.Includes(result))
+ {
+ UnityEngine.Debug.Log($"目录 {path} 不存在");
+ entrys = null;
+ return false;
+ }
+ long entryCount = 0;
+ nn.fs.Directory.GetEntryCount(ref entryCount, eHandle);
+ nn.fs.DirectoryEntry[] entries = new nn.fs.DirectoryEntry[entryCount];
+ long actualEntries = 0;
+ nn.fs.Directory.Read(ref actualEntries, entries, eHandle, entryCount);
- List temp = new List();
- for (int i = 0; i < actualEntries; i++)
- {
- string singlePath = System.IO.Path.Combine(path, entries[i].name);
- temp.Add(singlePath);
- if (entries[i].entryType == EntryType.Directory && GetDirectoryEntrysFullRecursion(singlePath, out string[] singleEntryList))
- {
- temp.AddRange(singleEntryList);
- }
- }
- nn.fs.Directory.Close(eHandle);
- entrys = temp.ToArray();
- return true;
+ List temp = new List();
+ for (int i = 0; i < actualEntries; i++)
+ {
+ string singlePath = System.IO.Path.Combine(path, entries[i].name);
+ temp.Add(singlePath);
+ if (entries[i].entryType == EntryType.Directory && GetDirectoryEntrysFullRecursion(singlePath, out string[] singleEntryList))
+ {
+ temp.AddRange(singleEntryList);
+ }
+ }
+ nn.fs.Directory.Close(eHandle);
+ entrys = temp.ToArray();
+ return true;
#else
entrys = null;
return false;
#endif
- }
+ }
- public IEnumerable EnumerateFiles(string path, string searchPattern)
- {
+ public IEnumerable EnumerateFiles(string path, string searchPattern)
+ {
#if !UNITY_SWITCH || UNITY_EDITOR
- yield break;
+ yield break;
#else
// 将通配符转换为正则表达式(支持*和?)
var regexPattern = "^" +
@@ -500,10 +500,10 @@ public class AxiNSIO
}
}
#endif
- }
+ }
- public bool DeletePathFile(string filename)
- {
+ public bool DeletePathFile(string filename)
+ {
#if !UNITY_SWITCH
return false;
#else
@@ -515,32 +515,32 @@ public class AxiNSIO
UnityEngine.Switch.Notification.EnterExitRequestHandlingSection();
#endif
- if (CheckPathNotFound(filename))
- return false;
- nn.Result result;
- result = nn.fs.File.Delete(filename);
- if (result.IsSuccess() == false)
- {
- UnityEngine.Debug.LogError($"nn.fs.File.Delete 失败 {filename} : result=>{result.GetErrorInfo()}");
- return false;
- }
+ if (CheckPathNotFound(filename))
+ return false;
+ nn.Result result;
+ result = nn.fs.File.Delete(filename);
+ if (result.IsSuccess() == false)
+ {
+ UnityEngine.Debug.LogError($"nn.fs.File.Delete 失败 {filename} : result=>{result.GetErrorInfo()}");
+ return false;
+ }
#if UNITY_SWITCH && !UNITY_EDITOR
// End preventing the user from quitting the game while saving.
UnityEngine.Switch.Notification.LeaveExitRequestHandlingSection();
#endif
- return CommitSave();
+ return CommitSave();
#endif
- }
- public AxiNSWait_DeletePathFile DeletePathFileAsync(string filename)
- {
- var wait = new AxiNSWait_DeletePathFile(filename);
- AxiNS.instance.wait.AddWait(wait);
- return wait;
- }
- public bool DeletePathDir(string filename)
- {
+ }
+ public AxiNSWait_DeletePathFile DeletePathFileAsync(string filename)
+ {
+ var wait = new AxiNSWait_DeletePathFile(filename);
+ AxiNS.instance.wait.AddWait(wait);
+ return wait;
+ }
+ public bool DeletePathDir(string filename)
+ {
#if !UNITY_SWITCH
return false;
#else
@@ -551,31 +551,31 @@ public class AxiNSIO
UnityEngine.Switch.Notification.EnterExitRequestHandlingSection();
#endif
- if (CheckPathNotFound(filename))
- return false;
- nn.Result result;
- result = nn.fs.Directory.Delete(filename);
- if (result.IsSuccess() == false)
- {
- UnityEngine.Debug.LogError($"nn.fs.File.Delete 失败 {filename} : result=>{result.GetErrorInfo()}");
- return false;
- }
+ if (CheckPathNotFound(filename))
+ return false;
+ nn.Result result;
+ result = nn.fs.Directory.Delete(filename);
+ if (result.IsSuccess() == false)
+ {
+ UnityEngine.Debug.LogError($"nn.fs.File.Delete 失败 {filename} : result=>{result.GetErrorInfo()}");
+ return false;
+ }
#if UNITY_SWITCH && !UNITY_EDITOR
// End preventing the user from quitting the game while saving.
UnityEngine.Switch.Notification.LeaveExitRequestHandlingSection();
#endif
- return CommitSave();
+ return CommitSave();
#endif
- }
- public AxiNSWait_DeletePathDir DeletePathDirAsync(string filename)
- {
- var wait = new AxiNSWait_DeletePathDir(filename);
- AxiNS.instance.wait.AddWait(wait);
- return wait;
- }
- public bool DeletePathDirRecursively(string filename)
- {
+ }
+ public AxiNSWait_DeletePathDir DeletePathDirAsync(string filename)
+ {
+ var wait = new AxiNSWait_DeletePathDir(filename);
+ AxiNS.instance.wait.AddWait(wait);
+ return wait;
+ }
+ public bool DeletePathDirRecursively(string filename)
+ {
#if !UNITY_SWITCH
return false;
#else
@@ -586,37 +586,37 @@ public class AxiNSIO
UnityEngine.Switch.Notification.EnterExitRequestHandlingSection();
#endif
- if (CheckPathNotFound(filename))
- return false;
- nn.Result result;
- result = nn.fs.Directory.DeleteRecursively(filename);
- if (result.IsSuccess() == false)
- {
- UnityEngine.Debug.LogError($"nn.fs.File.Recursively 失败 {filename} : result=>{result.GetErrorInfo()}");
- return false;
- }
+ if (CheckPathNotFound(filename))
+ return false;
+ nn.Result result;
+ result = nn.fs.Directory.DeleteRecursively(filename);
+ if (result.IsSuccess() == false)
+ {
+ UnityEngine.Debug.LogError($"nn.fs.File.Recursively 失败 {filename} : result=>{result.GetErrorInfo()}");
+ return false;
+ }
#if UNITY_SWITCH && !UNITY_EDITOR
// End preventing the user from quitting the game while saving.
UnityEngine.Switch.Notification.LeaveExitRequestHandlingSection();
#endif
- return CommitSave();
+ return CommitSave();
#endif
- }
- public AxiNSWait_DeletePathDirRecursively DeletePathDirRecursivelyAsync(string filename)
- {
- var wait = new AxiNSWait_DeletePathDirRecursively(filename);
- AxiNS.instance.wait.AddWait(wait);
- return wait;
- }
+ }
+ public AxiNSWait_DeletePathDirRecursively DeletePathDirRecursivelyAsync(string filename)
+ {
+ var wait = new AxiNSWait_DeletePathDirRecursively(filename);
+ AxiNS.instance.wait.AddWait(wait);
+ return wait;
+ }
- ///
- /// 递归删除目录
- ///
- ///
- ///
- public bool DeleteRecursivelyPathDir(string filename)
- {
+ ///
+ /// 递归删除目录
+ ///
+ ///
+ ///
+ public bool DeleteRecursivelyPathDir(string filename)
+ {
#if !UNITY_SWITCH
return false;
#else
@@ -627,31 +627,31 @@ public class AxiNSIO
UnityEngine.Switch.Notification.EnterExitRequestHandlingSection();
#endif
- if (CheckPathNotFound(filename))
- return false;
- nn.Result result;
- result = nn.fs.Directory.DeleteRecursively(filename);
- if (result.IsSuccess() == false)
- {
- UnityEngine.Debug.LogError($"nn.fs.File.DeleteRecursively 失败 {filename} : result=>{result.GetErrorInfo()}");
- return false;
- }
+ if (CheckPathNotFound(filename))
+ return false;
+ nn.Result result;
+ result = nn.fs.Directory.DeleteRecursively(filename);
+ if (result.IsSuccess() == false)
+ {
+ UnityEngine.Debug.LogError($"nn.fs.File.DeleteRecursively 失败 {filename} : result=>{result.GetErrorInfo()}");
+ return false;
+ }
#if UNITY_SWITCH && !UNITY_EDITOR
// End preventing the user from quitting the game while saving.
UnityEngine.Switch.Notification.LeaveExitRequestHandlingSection();
#endif
- return CommitSave();
+ return CommitSave();
#endif
- }
+ }
- ///
- /// 递归删除情况
- ///
- ///
- ///
- public bool CleanRecursivelyPathDir(string filename)
- {
+ ///
+ /// 递归删除情况
+ ///
+ ///
+ ///
+ public bool CleanRecursivelyPathDir(string filename)
+ {
#if !UNITY_SWITCH
return false;
#else
@@ -662,26 +662,26 @@ public class AxiNSIO
UnityEngine.Switch.Notification.EnterExitRequestHandlingSection();
#endif
- if (CheckPathNotFound(filename))
- return false;
- nn.Result result;
- result = nn.fs.Directory.CleanRecursively(filename);
- if (result.IsSuccess() == false)
- {
- UnityEngine.Debug.LogError($"nn.fs.File.DeleteRecursively 失败 {filename} : result=>{result.GetErrorInfo()}");
- return false;
- }
+ if (CheckPathNotFound(filename))
+ return false;
+ nn.Result result;
+ result = nn.fs.Directory.CleanRecursively(filename);
+ if (result.IsSuccess() == false)
+ {
+ UnityEngine.Debug.LogError($"nn.fs.File.DeleteRecursively 失败 {filename} : result=>{result.GetErrorInfo()}");
+ return false;
+ }
#if UNITY_SWITCH && !UNITY_EDITOR
// End preventing the user from quitting the game while saving.
UnityEngine.Switch.Notification.LeaveExitRequestHandlingSection();
#endif
- return CommitSave();
+ return CommitSave();
#endif
- }
+ }
- public bool RenameDir(string oldpath, string newpath)
- {
+ public bool RenameDir(string oldpath, string newpath)
+ {
#if !UNITY_SWITCH
return false;
#else
@@ -692,146 +692,178 @@ public class AxiNSIO
UnityEngine.Switch.Notification.EnterExitRequestHandlingSection();
#endif
- if (CheckPathNotFound(oldpath))
- return false;
+ if (CheckPathNotFound(oldpath))
+ return false;
- nn.Result result;
- result = nn.fs.Directory.Rename(oldpath, newpath);
- if (result.IsSuccess() == false)
- {
- UnityEngine.Debug.LogError($"nn.fs.File.Rename 失败 {oldpath} to {newpath} : result=>{result.GetErrorInfo()}");
- return false;
- }
+ nn.Result result;
+ result = nn.fs.Directory.Rename(oldpath, newpath);
+ if (result.IsSuccess() == false)
+ {
+ UnityEngine.Debug.LogError($"nn.fs.File.Rename 失败 {oldpath} to {newpath} : result=>{result.GetErrorInfo()}");
+ return false;
+ }
#if UNITY_SWITCH && !UNITY_EDITOR
// End preventing the user from quitting the game while saving.
UnityEngine.Switch.Notification.LeaveExitRequestHandlingSection();
#endif
- return CommitSave();
+ return CommitSave();
#endif
- }
- bool EnsureParentDirectory(string filePath, bool bAutoCreateDir = true)
- {
+ }
+ bool EnsureParentDirectory(string filePath, bool bAutoCreateDir = true)
+ {
#if !UNITY_SWITCH
return false;
#else
- // 参数校验
- if (string.IsNullOrEmpty(filePath))
- {
- UnityEngine.Debug.LogError($"无效参数:filePath={filePath}");
- return false;
- }
+ // 参数校验
+ if (string.IsNullOrEmpty(filePath))
+ {
+ UnityEngine.Debug.LogError($"无效参数:filePath={filePath}");
+ return false;
+ }
- // 提取路径前缀(如 save:/、sd:/)
- int prefixEndIndex = filePath.IndexOf(":/");
- if (prefixEndIndex == -1)
- {
- UnityEngine.Debug.LogError($"文件路径 {filePath} 格式无效,未找到 ':/' 前缀");
- return false;
- }
- string pathPrefix = filePath.Substring(0, prefixEndIndex + 2); // 提取前缀,例如 "save:/"
- string relativePath = filePath.Substring(prefixEndIndex + 2); // 移除前缀,得到相对路径
+ // 提取路径前缀(如 save:/、sd:/)
+ int prefixEndIndex = filePath.IndexOf(":/");
+ if (prefixEndIndex == -1)
+ {
+ UnityEngine.Debug.LogError($"文件路径 {filePath} 格式无效,未找到 ':/' 前缀");
+ return false;
+ }
+ string pathPrefix = filePath.Substring(0, prefixEndIndex + 2); // 提取前缀,例如 "save:/"
+ string relativePath = filePath.Substring(prefixEndIndex + 2); // 移除前缀,得到相对路径
- // 检查挂载状态
- if (!IsMountPointAccessible(pathPrefix))
- {
- UnityEngine.Debug.LogError($"挂载点 {pathPrefix} 未挂载,无法操作路径 {filePath}");
- return false;
- }
+ // 检查挂载状态
+ if (!IsMountPointAccessible(pathPrefix))
+ {
+ UnityEngine.Debug.LogError($"挂载点 {pathPrefix} 未挂载,无法操作路径 {filePath}");
+ return false;
+ }
- // 提取父目录路径
- string directoryPath = System.IO.Path.GetDirectoryName(relativePath); // 获取父目录相对路径
- if (string.IsNullOrEmpty(directoryPath))
- {
- UnityEngine.Debug.Log($"文件路径 {filePath} 无需创建父目录(位于根目录)");
- return true; // 根目录无需创建
- }
+ // 提取父目录路径
+ string directoryPath = System.IO.Path.GetDirectoryName(relativePath); // 获取父目录相对路径
+ if (string.IsNullOrEmpty(directoryPath))
+ {
+ UnityEngine.Debug.Log($"文件路径 {filePath} 无需创建父目录(位于根目录)");
+ return true; // 根目录无需创建
+ }
- string fullDirectoryPath = $"{pathPrefix}{directoryPath}"; // 拼接完整父目录路径
- UnityEngine.Debug.Log($"检查父目录: {fullDirectoryPath}");
+ string fullDirectoryPath = $"{pathPrefix}{directoryPath}"; // 拼接完整父目录路径
+ UnityEngine.Debug.Log($"检查父目录: {fullDirectoryPath}");
- // 检查路径是否存在及其类型
- nn.fs.EntryType entryType = 0;
- nn.Result result = nn.fs.FileSystem.GetEntryType(ref entryType, fullDirectoryPath);
- if (!result.IsSuccess() && nn.fs.FileSystem.ResultPathNotFound.Includes(result))
- {
- if (bAutoCreateDir)
- {
- // 路径不存在,尝试创建
- UnityEngine.Debug.Log($"父目录 {fullDirectoryPath} 不存在,尝试创建 (判断依据 result=>{result.ToString()})");
- result = nn.fs.Directory.Create(fullDirectoryPath);
- if (!result.IsSuccess())
- {
- UnityEngine.Debug.LogError($"创建父目录失败: {result.GetErrorInfo()}");
- return false;
- }
- UnityEngine.Debug.Log($"父目录 {fullDirectoryPath} 创建成功");
- return true;
- }
- return false;
- }
- else if (result.IsSuccess() && entryType != nn.fs.EntryType.Directory)
- {
- // 路径存在,但不是目录
- UnityEngine.Debug.LogError($"路径 {fullDirectoryPath} 已存在,但不是目录");
- return false;
- }
- else if (!result.IsSuccess())
- {
- // 其他错误
- UnityEngine.Debug.LogError($"检查父目录失败: {result.GetErrorInfo()}");
- return false;
- }
- // 路径存在且是目录
- UnityEngine.Debug.Log($"父目录 {fullDirectoryPath} 已存在且有效");
- return true;
+ // 检查路径是否存在及其类型
+ nn.fs.EntryType entryType = 0;
+ nn.Result result = nn.fs.FileSystem.GetEntryType(ref entryType, fullDirectoryPath);
+ if (!result.IsSuccess() && nn.fs.FileSystem.ResultPathNotFound.Includes(result))
+ {
+ if (bAutoCreateDir)
+ {
+ //List NeedCreateList = new List();
+ //NeedCreateList.Add(fullDirectoryPath);
+ //nn.fs.EntryType entryTypeLoop = 0;
+ //nn.Result resultloop;
+ //string NodeLoop = fullDirectoryPath;
+ //while (!NodeLoop.EndsWith(":/"))
+ //{
+ // NodeLoop = System.IO.Path.GetDirectoryName(NodeLoop);
+ // if (NodeLoop.EndsWith(":/"))
+ // break;
+ // resultloop = nn.fs.FileSystem.GetEntryType(ref entryTypeLoop, NodeLoop);
+ // if (!resultloop.IsSuccess() && nn.fs.FileSystem.ResultPathNotFound.Includes(resultloop))
+ // {
+ // NeedCreateList.Add(NodeLoop);
+ // }
+ //}
+
+ //for(int i = NeedCreateList.Count - 1; i >= 0; i--)
+ //{
+ // string dirToCreate = NeedCreateList[i];
+ // // 路径不存在,尝试创建
+ // UnityEngine.Debug.Log($"父目录 {dirToCreate} 不存在,尝试创建 (判断依据 result=>{result.ToString()})");
+ // resultloop = nn.fs.Directory.Create(dirToCreate);
+ // if (!resultloop.IsSuccess())
+ // {
+ // UnityEngine.Debug.LogError($"创建父目录失败: {resultloop.GetErrorInfo()}");
+ // return false;
+ // }
+ // UnityEngine.Debug.Log($"父目录 {dirToCreate} 创建成功");
+ //}
+ //return true;
+
+ // 路径不存在,尝试创建
+ UnityEngine.Debug.Log($"父目录 {fullDirectoryPath} 不存在,尝试创建 (判断依据 result=>{result.ToString()})");
+ result = nn.fs.Directory.Create(fullDirectoryPath);
+ if (!result.IsSuccess())
+ {
+ UnityEngine.Debug.LogError($"创建父目录失败: {result.GetErrorInfo()}");
+ return false;
+ }
+ UnityEngine.Debug.Log($"父目录 {fullDirectoryPath} 创建成功");
+ return true;
+ }
+ return false;
+ }
+ else if (result.IsSuccess() && entryType != nn.fs.EntryType.Directory)
+ {
+ // 路径存在,但不是目录
+ UnityEngine.Debug.LogError($"路径 {fullDirectoryPath} 已存在,但不是目录");
+ return false;
+ }
+ else if (!result.IsSuccess())
+ {
+ // 其他错误
+ UnityEngine.Debug.LogError($"检查父目录失败: {result.GetErrorInfo()}");
+ return false;
+ }
+ // 路径存在且是目录
+ UnityEngine.Debug.Log($"父目录 {fullDirectoryPath} 已存在且有效");
+ return true;
#endif
- }
- ///
- /// 检查指定挂载点是否可访问
- ///
- /// 路径前缀,例如 "save:/" 或 "sd:/"
- /// 挂载点是否可访问
- bool IsMountPointAccessible(string pathPrefix)
- {
+ }
+ ///
+ /// 检查指定挂载点是否可访问
+ ///
+ /// 路径前缀,例如 "save:/" 或 "sd:/"
+ /// 挂载点是否可访问
+ bool IsMountPointAccessible(string pathPrefix)
+ {
#if !UNITY_SWITCH
return false;
#else
- if (string.IsNullOrEmpty(pathPrefix))
- {
- UnityEngine.Debug.LogError($"无效挂载点: {pathPrefix}");
- return false;
- }
+ if (string.IsNullOrEmpty(pathPrefix))
+ {
+ UnityEngine.Debug.LogError($"无效挂载点: {pathPrefix}");
+ return false;
+ }
- // 根据前缀判断挂载点类型并检查挂载状态
- if (pathPrefix == $"{save_name}:/")
- {
- if (!AxiNS.instance.mount.SaveIsMount)
- {
- UnityEngine.Debug.LogError($"{save_name}:/ 未挂载");
- return false;
- }
- return true;
- }
- else if (pathPrefix == "sd:/")
- {
- long freeSpace = 0;
- // 检查 SD 卡挂载状态(示例,需根据实际实现调整)
- nn.Result result = nn.fs.FileSystem.GetFreeSpaceSize(ref freeSpace, "sd:/");
- if (!result.IsSuccess())
- {
- UnityEngine.Debug.LogError($"sd:/ 未挂载或无法访问: {result.GetErrorInfo()}");
- return false;
- }
- return true;
- }
- else
- {
- UnityEngine.Debug.LogWarning($"未知挂载点 {pathPrefix},假定已挂载");
- return true; // 其他挂载点需根据实际需求实现
- }
+ // 根据前缀判断挂载点类型并检查挂载状态
+ if (pathPrefix == $"{save_name}:/")
+ {
+ if (!AxiNS.instance.mount.SaveIsMount)
+ {
+ UnityEngine.Debug.LogError($"{save_name}:/ 未挂载");
+ return false;
+ }
+ return true;
+ }
+ else if (pathPrefix == "sd:/")
+ {
+ long freeSpace = 0;
+ // 检查 SD 卡挂载状态(示例,需根据实际实现调整)
+ nn.Result result = nn.fs.FileSystem.GetFreeSpaceSize(ref freeSpace, "sd:/");
+ if (!result.IsSuccess())
+ {
+ UnityEngine.Debug.LogError($"sd:/ 未挂载或无法访问: {result.GetErrorInfo()}");
+ return false;
+ }
+ return true;
+ }
+ else
+ {
+ UnityEngine.Debug.LogWarning($"未知挂载点 {pathPrefix},假定已挂载");
+ return true; // 其他挂载点需根据实际需求实现
+ }
#endif
- }
+ }
}
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/IMPORTENT.prefab b/AxibugEmuOnline.Client.Switch/Assets/Resources/IMPORTENT.prefab
index cc925102..6ff21895 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Resources/IMPORTENT.prefab
+++ b/AxibugEmuOnline.Client.Switch/Assets/Resources/IMPORTENT.prefab
@@ -25,13 +25,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 173080370084988713}
+ serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7122109429436137579}
- m_RootOrder: -2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1464475178787633862
MonoBehaviour:
@@ -78,6 +78,7 @@ MonoBehaviour:
m_DeselectOnBackgroundClick: 1
m_PointerBehavior: 0
m_CursorLockBehavior: 0
+ m_ScrollDeltaPerTick: 6
--- !u!1 &261166211120060501
GameObject:
m_ObjectHideFlags: 0
@@ -111,7 +112,6 @@ RectTransform:
- {fileID: 7813729344275964042}
- {fileID: 4804966765082268001}
m_Father: {fileID: 5169543666820693527}
- m_RootOrder: -2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -167,7 +167,6 @@ RectTransform:
- {fileID: 4140710606298198504}
- {fileID: 3574645515793225367}
m_Father: {fileID: 7122109429436137579}
- m_RootOrder: -2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
@@ -191,6 +190,7 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
+ m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 1
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
@@ -268,7 +268,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8545038260809852605}
- m_RootOrder: -2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -346,6 +345,7 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4747871931704546037}
+ serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
@@ -356,7 +356,6 @@ Transform:
- {fileID: 5927909303067165599}
- {fileID: 5169543666820693527}
m_Father: {fileID: 0}
- m_RootOrder: -2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &-5568097984606286463
MonoBehaviour:
@@ -404,7 +403,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8545038260809852605}
- m_RootOrder: -2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -486,13 +484,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6868843688838274199}
+ serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7122109429436137579}
- m_RootOrder: -2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &5322909716643310759
MonoBehaviour:
@@ -537,7 +535,6 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8545038260809852605}
- m_RootOrder: -2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@@ -607,13 +604,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9087746359628224422}
+ serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7122109429436137579}
- m_RootOrder: -2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &4468044133909204598
Camera:
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png
new file mode 100644
index 00000000..53cbfaeb
Binary files /dev/null and b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png differ
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png.meta b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png.meta
new file mode 100644
index 00000000..4a2106ba
--- /dev/null
+++ b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/DevicesIcons/SwitchJoyCon.png.meta
@@ -0,0 +1,130 @@
+fileFormatVersion: 2
+guid: 562e8ae4167d26b42b4dd08d3f809531
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 13
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ flipGreenChannel: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ ignoreMipmapLimit: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapU: 1
+ wrapV: 1
+ wrapW: 0
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 1
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 1
+ spriteTessellationDetail: -1
+ textureType: 8
+ textureShape: 1
+ singleChannelComponent: 0
+ flipbookRows: 1
+ flipbookColumns: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ ignorePngGamma: 0
+ applyGammaDecoding: 0
+ swizzle: 50462976
+ cookieLightType: 0
+ platformSettings:
+ - serializedVersion: 4
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: Android
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ customData:
+ physicsShape: []
+ bones: []
+ spriteID: 5e97eb03825dee720800000000000000
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ spriteCustomMetadata:
+ entries: []
+ nameFileIdTable: {}
+ mipmapLimitGroupName:
+ pSDRemoveMatte: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/checking.png b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/checking.png
new file mode 100644
index 00000000..a7cf18ea
Binary files /dev/null and b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/checking.png differ
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/checking.png.meta b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/checking.png.meta
new file mode 100644
index 00000000..b40e8824
--- /dev/null
+++ b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/checking.png.meta
@@ -0,0 +1,117 @@
+fileFormatVersion: 2
+guid: 3efbb404fd0fa2440b59f2759cb66521
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 13
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ flipGreenChannel: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ ignoreMipmapLimit: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapU: 1
+ wrapV: 1
+ wrapW: 0
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 1
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 1
+ spriteTessellationDetail: -1
+ textureType: 8
+ textureShape: 1
+ singleChannelComponent: 0
+ flipbookRows: 1
+ flipbookColumns: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ ignorePngGamma: 0
+ applyGammaDecoding: 0
+ swizzle: 50462976
+ cookieLightType: 0
+ platformSettings:
+ - serializedVersion: 4
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ customData:
+ physicsShape: []
+ bones: []
+ spriteID: 5e97eb03825dee720800000000000000
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ spriteCustomMetadata:
+ entries: []
+ nameFileIdTable: {}
+ mipmapLimitGroupName:
+ pSDRemoveMatte: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/download.png b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/download.png
new file mode 100644
index 00000000..1531a6a0
Binary files /dev/null and b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/download.png differ
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/download.png.meta b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/download.png.meta
new file mode 100644
index 00000000..6916023d
--- /dev/null
+++ b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/download.png.meta
@@ -0,0 +1,117 @@
+fileFormatVersion: 2
+guid: 0ab2653139d474e40a1ce8213f36274e
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 13
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ flipGreenChannel: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ ignoreMipmapLimit: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapU: 1
+ wrapV: 1
+ wrapW: 0
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 1
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 1
+ spriteTessellationDetail: -1
+ textureType: 8
+ textureShape: 1
+ singleChannelComponent: 0
+ flipbookRows: 1
+ flipbookColumns: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ ignorePngGamma: 0
+ applyGammaDecoding: 0
+ swizzle: 50462976
+ cookieLightType: 0
+ platformSettings:
+ - serializedVersion: 4
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ customData:
+ physicsShape: []
+ bones: []
+ spriteID: 5e97eb03825dee720800000000000000
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ spriteCustomMetadata:
+ entries: []
+ nameFileIdTable: {}
+ mipmapLimitGroupName:
+ pSDRemoveMatte: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/downloaderror.png b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/downloaderror.png
new file mode 100644
index 00000000..062ecc7f
Binary files /dev/null and b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/downloaderror.png differ
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/downloaderror.png.meta b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/downloaderror.png.meta
new file mode 100644
index 00000000..be5104a9
--- /dev/null
+++ b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/downloaderror.png.meta
@@ -0,0 +1,117 @@
+fileFormatVersion: 2
+guid: 961aba7b7a39e4d4c832e94350f44d4c
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 13
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ flipGreenChannel: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ ignoreMipmapLimit: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapU: 1
+ wrapV: 1
+ wrapW: 0
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 1
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 1
+ spriteTessellationDetail: -1
+ textureType: 8
+ textureShape: 1
+ singleChannelComponent: 0
+ flipbookRows: 1
+ flipbookColumns: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ ignorePngGamma: 0
+ applyGammaDecoding: 0
+ swizzle: 50462976
+ cookieLightType: 0
+ platformSettings:
+ - serializedVersion: 4
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ customData:
+ physicsShape: []
+ bones: []
+ spriteID: 5e97eb03825dee720800000000000000
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ spriteCustomMetadata:
+ entries: []
+ nameFileIdTable: {}
+ mipmapLimitGroupName:
+ pSDRemoveMatte: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/syncerror.png b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/syncerror.png
new file mode 100644
index 00000000..1d6375b8
Binary files /dev/null and b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/syncerror.png differ
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/syncerror.png.meta b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/syncerror.png.meta
new file mode 100644
index 00000000..efc580d5
--- /dev/null
+++ b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/syncerror.png.meta
@@ -0,0 +1,117 @@
+fileFormatVersion: 2
+guid: 5ab158116cd13094f8aeec03e9c776bd
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 13
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ flipGreenChannel: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ ignoreMipmapLimit: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapU: 1
+ wrapV: 1
+ wrapW: 0
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 1
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 1
+ spriteTessellationDetail: -1
+ textureType: 8
+ textureShape: 1
+ singleChannelComponent: 0
+ flipbookRows: 1
+ flipbookColumns: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ ignorePngGamma: 0
+ applyGammaDecoding: 0
+ swizzle: 50462976
+ cookieLightType: 0
+ platformSettings:
+ - serializedVersion: 4
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ customData:
+ physicsShape: []
+ bones: []
+ spriteID: 5e97eb03825dee720800000000000000
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ spriteCustomMetadata:
+ entries: []
+ nameFileIdTable: {}
+ mipmapLimitGroupName:
+ pSDRemoveMatte: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/upload.png b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/upload.png
new file mode 100644
index 00000000..fe7d2a8a
Binary files /dev/null and b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/upload.png differ
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/upload.png.meta b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/upload.png.meta
new file mode 100644
index 00000000..500718c1
--- /dev/null
+++ b/AxibugEmuOnline.Client.Switch/Assets/Resources/Icons/upload.png.meta
@@ -0,0 +1,117 @@
+fileFormatVersion: 2
+guid: fe23eed4ad510ca42885889dbb8aaf06
+TextureImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 13
+ mipmaps:
+ mipMapMode: 0
+ enableMipMap: 0
+ sRGBTexture: 1
+ linearTexture: 0
+ fadeOut: 0
+ borderMipMap: 0
+ mipMapsPreserveCoverage: 0
+ alphaTestReferenceValue: 0.5
+ mipMapFadeDistanceStart: 1
+ mipMapFadeDistanceEnd: 3
+ bumpmap:
+ convertToNormalMap: 0
+ externalNormalMap: 0
+ heightScale: 0.25
+ normalMapFilter: 0
+ flipGreenChannel: 0
+ isReadable: 0
+ streamingMipmaps: 0
+ streamingMipmapsPriority: 0
+ vTOnly: 0
+ ignoreMipmapLimit: 0
+ grayScaleToAlpha: 0
+ generateCubemap: 6
+ cubemapConvolution: 0
+ seamlessCubemap: 0
+ textureFormat: 1
+ maxTextureSize: 2048
+ textureSettings:
+ serializedVersion: 2
+ filterMode: 1
+ aniso: 1
+ mipBias: 0
+ wrapU: 1
+ wrapV: 1
+ wrapW: 0
+ nPOTScale: 0
+ lightmap: 0
+ compressionQuality: 50
+ spriteMode: 1
+ spriteExtrude: 1
+ spriteMeshType: 1
+ alignment: 0
+ spritePivot: {x: 0.5, y: 0.5}
+ spritePixelsToUnits: 100
+ spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+ spriteGenerateFallbackPhysicsShape: 1
+ alphaUsage: 1
+ alphaIsTransparency: 1
+ spriteTessellationDetail: -1
+ textureType: 8
+ textureShape: 1
+ singleChannelComponent: 0
+ flipbookRows: 1
+ flipbookColumns: 1
+ maxTextureSizeSet: 0
+ compressionQualitySet: 0
+ textureFormatSet: 0
+ ignorePngGamma: 0
+ applyGammaDecoding: 0
+ swizzle: 50462976
+ cookieLightType: 0
+ platformSettings:
+ - serializedVersion: 4
+ buildTarget: DefaultTexturePlatform
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ - serializedVersion: 4
+ buildTarget: Standalone
+ maxTextureSize: 2048
+ resizeAlgorithm: 0
+ textureFormat: -1
+ textureCompression: 1
+ compressionQuality: 50
+ crunchedCompression: 0
+ allowsAlphaSplitting: 0
+ overridden: 0
+ ignorePlatformSupport: 0
+ androidETC2FallbackOverride: 0
+ forceMaximumCompressionQuality_BC6H_BC7: 0
+ spriteSheet:
+ serializedVersion: 2
+ sprites: []
+ outline: []
+ customData:
+ physicsShape: []
+ bones: []
+ spriteID: 5e97eb03825dee720800000000000000
+ internalID: 0
+ vertices: []
+ indices:
+ edges: []
+ weights: []
+ secondaryTextures: []
+ spriteCustomMetadata:
+ entries: []
+ nameFileIdTable: {}
+ mipmapLimitGroupName:
+ pSDRemoveMatte: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Resources/UIPrefabs/OptionUI.prefab b/AxibugEmuOnline.Client.Switch/Assets/Resources/UIPrefabs/OptionUI.prefab
index fc677e08..e20dea9c 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Resources/UIPrefabs/OptionUI.prefab
+++ b/AxibugEmuOnline.Client.Switch/Assets/Resources/UIPrefabs/OptionUI.prefab
@@ -520,6 +520,81 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
gradient: {fileID: 46877084639177849}
+--- !u!1 &804908692400837359
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 8642975113305060610}
+ - component: {fileID: 6956713201433508184}
+ - component: {fileID: 1041409322641615}
+ m_Layer: 5
+ m_Name: download
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &8642975113305060610
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 804908692400837359}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 905458728127029103}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 25, y: 25}
+ m_SizeDelta: {x: 50, y: 50}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &6956713201433508184
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 804908692400837359}
+ m_CullTransparentMesh: 1
+--- !u!114 &1041409322641615
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 804908692400837359}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 0
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 21300000, guid: 961aba7b7a39e4d4c832e94350f44d4c, type: 3}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
--- !u!1 &1280900818828460255
GameObject:
m_ObjectHideFlags: 0
@@ -706,7 +781,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
- m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_Color: {r: 1, g: 0.80982494, b: 0, a: 1}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
@@ -973,9 +1048,12 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3539783812791358836}
- - {fileID: 6030618878828304669}
- {fileID: 2303902335643923373}
- {fileID: 8677023902282266940}
+ - {fileID: 7976727918032113692}
+ - {fileID: 8642975113305060610}
+ - {fileID: 5521327881148589877}
+ - {fileID: 1660924397234324979}
m_Father: {fileID: 5970282275929291192}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
@@ -1442,97 +1520,6 @@ MonoBehaviour:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5}
m_EffectDistance: {x: 1.5, y: -1.5}
m_UseGraphicAlpha: 1
---- !u!1 &4078965612622303339
-GameObject:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- serializedVersion: 6
- m_Component:
- - component: {fileID: 6030618878828304669}
- - component: {fileID: 6018890508858230420}
- - component: {fileID: 1865219663044263670}
- - component: {fileID: 6562970432720184454}
- m_Layer: 5
- m_Name: Syncing
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!224 &6030618878828304669
-RectTransform:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 4078965612622303339}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 0, z: 0}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_ConstrainProportionsScale: 0
- m_Children: []
- m_Father: {fileID: 905458728127029103}
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
- m_AnchorMin: {x: 0, y: 0}
- m_AnchorMax: {x: 0, y: 0}
- m_AnchoredPosition: {x: 25, y: 25}
- m_SizeDelta: {x: 50, y: 50}
- m_Pivot: {x: 0.5, y: 0.5}
---- !u!222 &6018890508858230420
-CanvasRenderer:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 4078965612622303339}
- m_CullTransparentMesh: 1
---- !u!114 &1865219663044263670
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 4078965612622303339}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_Material: {fileID: 0}
- m_Color: {r: 1, g: 1, b: 1, a: 1}
- m_RaycastTarget: 0
- m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
- m_Maskable: 1
- m_OnCullStateChanged:
- m_PersistentCalls:
- m_Calls: []
- m_Sprite: {fileID: 21300000, guid: c5a9535bb63e1f14f9a1528566864ab2, type: 3}
- m_Type: 0
- m_PreserveAspect: 0
- m_FillCenter: 1
- m_FillMethod: 4
- m_FillAmount: 1
- m_FillClockwise: 1
- m_FillOrigin: 0
- m_UseSpriteMesh: 0
- m_PixelsPerUnitMultiplier: 1
---- !u!114 &6562970432720184454
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_CorrespondingSourceObject: {fileID: 0}
- m_PrefabInstance: {fileID: 0}
- m_PrefabAsset: {fileID: 0}
- m_GameObject: {fileID: 4078965612622303339}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: 8707b921aaba60d45b4041e96f3542dd, type: 3}
- m_Name:
- m_EditorClassIdentifier:
- m_duration: 2
- m_ease: 1
- m_reverseRotation: 1
--- !u!1 &4124172888520656882
GameObject:
m_ObjectHideFlags: 0
@@ -3183,7 +3170,10 @@ MonoBehaviour:
UI_Empty: {fileID: 8350228378118296958}
UI_SavTime: {fileID: 13043593624240728}
UI_Disconnect: {fileID: 6998836277133601669}
- UI_Syncing: {fileID: 4078965612622303339}
+ UI_DownloadError: {fileID: 8857746597932873861}
+ UI_Downloading: {fileID: 804908692400837359}
+ UI_Uploading: {fileID: 8872483836623718893}
+ UI_Checking: {fileID: 7267609509608397888}
UI_Conflict: {fileID: 1601163034082482360}
UI_Synced: {fileID: 2637678715180681658}
--- !u!1 &7141318786199574664
@@ -3286,6 +3276,81 @@ MonoBehaviour:
m_EffectColor: {r: 0, g: 0, b: 0, a: 0.5}
m_EffectDistance: {x: 1.5, y: -1.5}
m_UseGraphicAlpha: 1
+--- !u!1 &7267609509608397888
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 1660924397234324979}
+ - component: {fileID: 5687683890234766428}
+ - component: {fileID: 6995705272401882157}
+ m_Layer: 5
+ m_Name: checking
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &1660924397234324979
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7267609509608397888}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 905458728127029103}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 25, y: 25}
+ m_SizeDelta: {x: 50, y: 50}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &5687683890234766428
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7267609509608397888}
+ m_CullTransparentMesh: 1
+--- !u!114 &6995705272401882157
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 7267609509608397888}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 0
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 21300000, guid: 3efbb404fd0fa2440b59f2759cb66521, type: 3}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
--- !u!1 &7579340952198812870
GameObject:
m_ObjectHideFlags: 0
@@ -3888,6 +3953,156 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
+--- !u!1 &8857746597932873861
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 7976727918032113692}
+ - component: {fileID: 8830922541807882247}
+ - component: {fileID: 74709689621410332}
+ m_Layer: 5
+ m_Name: syncerror
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &7976727918032113692
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8857746597932873861}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 905458728127029103}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 25, y: 25}
+ m_SizeDelta: {x: 50, y: 50}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &8830922541807882247
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8857746597932873861}
+ m_CullTransparentMesh: 1
+--- !u!114 &74709689621410332
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8857746597932873861}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 0, b: 0, a: 1}
+ m_RaycastTarget: 0
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 21300000, guid: 5ab158116cd13094f8aeec03e9c776bd, type: 3}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
+--- !u!1 &8872483836623718893
+GameObject:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ serializedVersion: 6
+ m_Component:
+ - component: {fileID: 5521327881148589877}
+ - component: {fileID: 1453351515137974665}
+ - component: {fileID: 625482330037984562}
+ m_Layer: 5
+ m_Name: upload
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!224 &5521327881148589877
+RectTransform:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8872483836623718893}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_ConstrainProportionsScale: 0
+ m_Children: []
+ m_Father: {fileID: 905458728127029103}
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+ m_AnchorMin: {x: 0, y: 0}
+ m_AnchorMax: {x: 0, y: 0}
+ m_AnchoredPosition: {x: 25, y: 25}
+ m_SizeDelta: {x: 50, y: 50}
+ m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &1453351515137974665
+CanvasRenderer:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8872483836623718893}
+ m_CullTransparentMesh: 1
+--- !u!114 &625482330037984562
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 8872483836623718893}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+ m_Material: {fileID: 0}
+ m_Color: {r: 1, g: 1, b: 1, a: 1}
+ m_RaycastTarget: 0
+ m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+ m_Maskable: 1
+ m_OnCullStateChanged:
+ m_PersistentCalls:
+ m_Calls: []
+ m_Sprite: {fileID: 21300000, guid: fe23eed4ad510ca42885889dbb8aaf06, type: 3}
+ m_Type: 0
+ m_PreserveAspect: 0
+ m_FillCenter: 1
+ m_FillMethod: 4
+ m_FillAmount: 1
+ m_FillClockwise: 1
+ m_FillOrigin: 0
+ m_UseSpriteMesh: 0
+ m_PixelsPerUnitMultiplier: 1
--- !u!1 &8884391103430529053
GameObject:
m_ObjectHideFlags: 0
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Scene/AxibugEmuOnline.Client.unity b/AxibugEmuOnline.Client.Switch/Assets/Scene/AxibugEmuOnline.Client.unity
index 592ac5ab..1a77c117 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Scene/AxibugEmuOnline.Client.unity
+++ b/AxibugEmuOnline.Client.Switch/Assets/Scene/AxibugEmuOnline.Client.unity
@@ -13,7 +13,7 @@ OcclusionCullingSettings:
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
- serializedVersion: 10
+ serializedVersion: 9
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
@@ -38,12 +38,13 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
+ m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
- serializedVersion: 13
- m_BakeOnSceneLoad: 0
+ serializedVersion: 12
+ m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
@@ -66,6 +67,9 @@ LightmapSettings:
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
+ m_FinalGather: 0
+ m_FinalGatherFiltering: 1
+ m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 1
@@ -143,13 +147,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 408101310}
- serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
+ m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &408101312
MonoBehaviour:
@@ -164,6 +168,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
AllowDebugging: 1
+ OpenHubOnStart: 0
+ AutoShowLastLogLine: 0
+ OnlyShowErrOnStart: 0
--- !u!1 &1335662458
GameObject:
m_ObjectHideFlags: 0
@@ -188,13 +195,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1335662458}
- serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
+ m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1335662460
MonoBehaviour:
@@ -266,18 +273,11 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1498586261}
- serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
+ m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!1660057539 &9223372036854775807
-SceneRoots:
- m_ObjectHideFlags: 0
- m_Roots:
- - {fileID: 1498586263}
- - {fileID: 1335662459}
- - {fileID: 408101311}
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/App.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/App.cs
index 1d78b05a..03fd39d9 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/App.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/App.cs
@@ -90,9 +90,14 @@ namespace AxibugEmuOnline.Client.ClientCore
public static void Init(bool isTest = false, bool isUseGUIButton = false, string testSrvIP = "", bool bUseLocalWebApi = false, string mLocalWebApi = "")
{
log = new LogManager(OnLogOut);
-
//鍏朵粬骞冲彴蹇呰鐨勫垵濮嬪寲
- if (UnityEngine.Application.platform == RuntimePlatform.PSP2) PSP2Init();
+#if UNITY_PSP2
+ PSP2Init();
+#endif
+
+#if UNITY_SWITCH
+ SwitchInit();
+#endif
input = new InputDevicesManager();
FileDownloader = new FileDownloader();
@@ -153,11 +158,18 @@ namespace AxibugEmuOnline.Client.ClientCore
sonyVitaCommonDialog = new GameObject().AddComponent();
#endif
-#if UNITY_SWITCH
- //鍒涘缓鍒涘缓Switch
- switchCommon = new GameObject().AddComponent();
-#endif
+ }
+ private static void SwitchInit()
+ {
+#if UNITY_SWITCH
+ AxiNS.instance.Init();
+ if (!AxiIO.Directory.Exists(App.PersistentDataRootPath()))
+ AxiIO.Directory.CreateDirectory(App.PersistentDataRootPath());
+ switchCommon = new GameObject().AddComponent();
+ switchCommon.gameObject.name = "[SwitchCommon]";
+ GameObject.DontDestroyOnLoad(switchCommon);
+#endif
}
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/AxiHttp/AxiHttp.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/AxiHttp/AxiHttp.cs
index b255ac8d..cf0dc512 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/AxiHttp/AxiHttp.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/AxiHttp/AxiHttp.cs
@@ -166,20 +166,23 @@ public static class AxiHttp
public static IPAddress GetDnsIP(string str)
{
- if (!dictIP2Address.ContainsKey(str))
+ lock (dictIP2Address)
{
- IPHostEntry host = Dns.GetHostEntry(str);
- IPAddress ip = null;
- foreach (var item in host.AddressList)
+ if (!dictIP2Address.ContainsKey(str))
{
- if (item.AddressFamily == AddressFamily.InterNetwork)
+ IPHostEntry host = Dns.GetHostEntry(str);
+ IPAddress ip = null;
+ foreach (var item in host.AddressList)
{
- ip = item; break;
+ if (item.AddressFamily == AddressFamily.InterNetwork)
+ {
+ ip = item; break;
+ }
}
+ dictIP2Address[str] = ip;
}
- dictIP2Address[str] = ip;
+ return dictIP2Address[str];
}
- return dictIP2Address[str];
}
public enum AxiDownLoadMode
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/AxiInputSP/PSVita/AxiPSVBackTouchEmuKey.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/AxiInputSP/PSVita/AxiPSVBackTouchEmuKey.cs
index b3f3542b..6a0b74e1 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/AxiInputSP/PSVita/AxiPSVBackTouchEmuKey.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/AxiInputSP/PSVita/AxiPSVBackTouchEmuKey.cs
@@ -62,11 +62,7 @@ namespace AxiInputSP
m_TouckState[AxiPSVBackTouchType.RightBotton] = new AxiPSVBackTouchState(AxiPSVBackTouchType.RightBotton);
}
- private void OnEnable()
- {
- }
-
- private void OnDisable()
+ void OnDestroy()
{
_instance = null;
}
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/DebuggerByGUI.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/DebuggerByGUI.cs
index 9affce45..0853c920 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/DebuggerByGUI.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/DebuggerByGUI.cs
@@ -24,7 +24,7 @@ public class DebuggerByGUI : MonoBehaviour
private Vector2 _scrollLogView = Vector2.zero;
private Vector2 _scrollCurrentLogView = Vector2.zero;
private Vector2 _scrollSystemView = Vector2.zero;
- private bool _expansion = false;
+ private bool _expansion = false;
private Rect _windowRect = new Rect(0, 0, 100, 60);
private int _fps = 0;
@@ -32,9 +32,26 @@ public class DebuggerByGUI : MonoBehaviour
private int _frameNumber = 0;
private float _lastShowFPSTime = 0f;
- private void Start()
+ public bool OpenHubOnStart = false;
+ public bool AutoShowLastLogLine = false;
+ public bool OnlyShowErrOnStart = false;
+
+ private void Start()
{
- DontDestroyOnLoad(this.gameObject);
+ if (OpenHubOnStart)
+ {
+ _expansion = true;
+ _windowRect.width = 1000;
+ _windowRect.height = 600;
+ }
+
+ if (OnlyShowErrOnStart)
+ {
+ _showInfoLog = false;
+ _showWarningLog = false;
+ }
+
+ DontDestroyOnLoad(this.gameObject);
if (AllowDebugging)
{
Application.logMessageReceived += LogHandler;
@@ -237,16 +254,22 @@ public class DebuggerByGUI : MonoBehaviour
GUILayout.Label(_logInformations[i].message);
GUILayout.FlexibleSpace();
GUI.contentColor = Color.white;
- GUILayout.EndHorizontal();
+ GUILayout.EndHorizontal();
}
}
GUILayout.EndScrollView();
_scrollCurrentLogView = GUILayout.BeginScrollView(_scrollCurrentLogView, "Box", GUILayout.Height(100));
- if (_currentLogIndex != -1)
+
+ if (AutoShowLastLogLine)
+ {
+ _scrollLogView.y = Mathf.Lerp(_scrollLogView.y, float.MaxValue, 0.1f);
+ }
+
+ if (_currentLogIndex != -1)
{
GUILayout.Label(_logInformations[_currentLogIndex].message + "\r\n\r\n" + _logInformations[_currentLogIndex].stackTrace);
- }
+ }
GUILayout.EndScrollView();
}
#endregion
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Emulator/NesEmulator/NesEmulator_Screen.mat b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Emulator/NesEmulator/NesEmulator_Screen.mat
index 74fd7309..d581fae5 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Emulator/NesEmulator/NesEmulator_Screen.mat
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Emulator/NesEmulator/NesEmulator_Screen.mat
@@ -92,3 +92,4 @@ Material:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
+ m_AllowLocking: 1
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/EssgeeKeyBinding.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/EssgeeKeyBinding.cs
index 159c8be1..39161387 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/EssgeeKeyBinding.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/EssgeeKeyBinding.cs
@@ -147,6 +147,25 @@ namespace AxibugEmuOnline.Client.Settings
controller.SetBinding(EssgeeSingleKey.LEFT, device.JOYSTICK.Left, 1);
controller.SetBinding(EssgeeSingleKey.RIGHT, device.JOYSTICK.Right, 1);
}
+
+ public override void Bind(SwitchJoyCon_D device, ControllerBinder controller)
+ {
+ controller.SetBinding(EssgeeSingleKey.OPTION_1, device.Plus, 0);
+ controller.SetBinding(EssgeeSingleKey.OPTION_2, device.Minus, 0);
+ controller.SetBinding(EssgeeSingleKey.UP, device.Up, 0);
+ controller.SetBinding(EssgeeSingleKey.DOWN, device.Down, 0);
+ controller.SetBinding(EssgeeSingleKey.LEFT, device.Left, 0);
+ controller.SetBinding(EssgeeSingleKey.RIGHT, device.Right, 0);
+ controller.SetBinding(EssgeeSingleKey.BTN_1, device.A, 0);
+ controller.SetBinding(EssgeeSingleKey.BTN_2, device.B, 0);
+ controller.SetBinding(EssgeeSingleKey.BTN_3, device.X, 0);
+ controller.SetBinding(EssgeeSingleKey.BTN_4, device.Y, 0);
+
+ controller.SetBinding(EssgeeSingleKey.UP, device.LeftStick.Up, 1);
+ controller.SetBinding(EssgeeSingleKey.DOWN, device.LeftStick.Down, 1);
+ controller.SetBinding(EssgeeSingleKey.LEFT, device.LeftStick.Left, 1);
+ controller.SetBinding(EssgeeSingleKey.RIGHT, device.LeftStick.Right, 1);
+ }
}
public class MasterSystemKeyBinding : EssgeeKeyBinding
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/MAMEKeyBinding.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/MAMEKeyBinding.cs
index f7962ab9..f8af305c 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/MAMEKeyBinding.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/MAMEKeyBinding.cs
@@ -158,6 +158,27 @@ namespace AxibugEmuOnline.Client.Settings
controller.SetBinding(UMAMEKSingleKey.LEFT, device.JOYSTICK.Left, 1);
controller.SetBinding(UMAMEKSingleKey.RIGHT, device.JOYSTICK.Right, 1);
}
+
+ public override void Bind(SwitchJoyCon_D device, ControllerBinder controller)
+ {
+ controller.SetBinding(UMAMEKSingleKey.INSERT_COIN, device.Minus, 0);
+ controller.SetBinding(UMAMEKSingleKey.GAMESTART, device.Plus, 0);
+ controller.SetBinding(UMAMEKSingleKey.UP, device.Up, 0);
+ controller.SetBinding(UMAMEKSingleKey.DOWN, device.Down, 0);
+ controller.SetBinding(UMAMEKSingleKey.LEFT, device.Left, 0);
+ controller.SetBinding(UMAMEKSingleKey.RIGHT, device.Right, 0);
+ controller.SetBinding(UMAMEKSingleKey.BTN_A, device.A, 0);
+ controller.SetBinding(UMAMEKSingleKey.BTN_B, device.B, 0);
+ controller.SetBinding(UMAMEKSingleKey.BTN_C, device.X, 0);
+ controller.SetBinding(UMAMEKSingleKey.BTN_D, device.Y, 0);
+ controller.SetBinding(UMAMEKSingleKey.BTN_E, device.LeftSL, 0);
+ controller.SetBinding(UMAMEKSingleKey.BTN_F, device.RightSL, 0);
+
+ controller.SetBinding(UMAMEKSingleKey.UP, device.LeftStick.Up, 1);
+ controller.SetBinding(UMAMEKSingleKey.DOWN, device.LeftStick.Down, 1);
+ controller.SetBinding(UMAMEKSingleKey.LEFT, device.LeftStick.Left, 1);
+ controller.SetBinding(UMAMEKSingleKey.RIGHT, device.LeftStick.Right, 1);
+ }
}
public class NEOGEOKeyBinding : MAMEKeyBinding
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/Model/EmuCoreBinder.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/Model/EmuCoreBinder.cs
index 86d36556..dc4aab0e 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/Model/EmuCoreBinder.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/Model/EmuCoreBinder.cs
@@ -16,7 +16,8 @@ public abstract class EmuCoreBinder : InternalEmuCoreBinder,
IDeviceBinder,
IDeviceBinder,
IDeviceBinder,
- IDeviceBinder
+ IDeviceBinder,
+ IDeviceBinder
where T : Enum
{
//姣忎竴涓疄渚嬩唬琛ㄤ竴涓搴旀ā鎷熷櫒骞冲彴鐨勬帶鍒跺櫒绱㈠紩
@@ -83,6 +84,7 @@ public abstract class EmuCoreBinder : InternalEmuCoreBinder,
else if (device is XboxController_D xbC) Bind(xbC, binding);
else if (device is PSVController_D psvC) Bind(psvC, binding);
else if (device is ScreenGamepad_D screenGamepad) Bind(screenGamepad, binding);
+ else if (device is SwitchJoyCon_D nsJoyCon) Bind(nsJoyCon, binding);
else throw new NotImplementedException($"{device.GetType()}");
}
@@ -305,4 +307,5 @@ public abstract class EmuCoreBinder : InternalEmuCoreBinder,
public abstract void Bind(XboxController_D device, ControllerBinder controller);
public abstract void Bind(PSVController_D device, ControllerBinder controller);
public abstract void Bind(ScreenGamepad_D device, ControllerBinder controller);
+ public abstract void Bind(SwitchJoyCon_D device, ControllerBinder controller);
}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/NesKeyBinding.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/NesKeyBinding.cs
index 4781c3fb..6d42aa0d 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/NesKeyBinding.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/NesKeyBinding.cs
@@ -121,5 +121,22 @@ namespace AxibugEmuOnline.Client.Settings
controller.SetBinding(EnumButtonType.UP, device.JOYSTICK.Up, 1);
controller.SetBinding(EnumButtonType.DOWN, device.JOYSTICK.Down, 1);
}
+ public override void Bind(SwitchJoyCon_D device, ControllerBinder controller)
+ {
+ controller.SetBinding(EnumButtonType.LEFT, device.Left, 0);
+ controller.SetBinding(EnumButtonType.RIGHT, device.Right, 0);
+ controller.SetBinding(EnumButtonType.UP, device.Up, 0);
+ controller.SetBinding(EnumButtonType.DOWN, device.Down, 0);
+ controller.SetBinding(EnumButtonType.A, device.A, 0);
+ controller.SetBinding(EnumButtonType.B, device.B, 0);
+ controller.SetBinding(EnumButtonType.SELECT, device.Minus, 0);
+ controller.SetBinding(EnumButtonType.START, device.Plus, 0);
+ controller.SetBinding(EnumButtonType.MIC, device.RightSL, 0);
+
+ controller.SetBinding(EnumButtonType.LEFT, device.LeftStick.Left, 1);
+ controller.SetBinding(EnumButtonType.RIGHT, device.LeftStick.Right, 1);
+ controller.SetBinding(EnumButtonType.UP, device.LeftStick.Up, 1);
+ controller.SetBinding(EnumButtonType.DOWN, device.LeftStick.Down, 1);
+ }
}
}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/XMBKeyBinding.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/XMBKeyBinding.cs
index 5ef9669a..8061c3d0 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/XMBKeyBinding.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/AppSettings/KeyMapperSetting/XMBKeyBinding.cs
@@ -112,5 +112,20 @@ namespace AxibugEmuOnline.Client
controller.SetBinding(EnumCommand.SelectItemRight, device.JOYSTICK.Right, 1);
controller.SetBinding(EnumCommand.SelectItemUp, device.JOYSTICK.Up, 1);
}
+ public override void Bind(SwitchJoyCon_D device, ControllerBinder controller)
+ {
+ controller.SetBinding(EnumCommand.Back, device.A, 0);
+ controller.SetBinding(EnumCommand.Enter, device.B, 0);
+ controller.SetBinding(EnumCommand.OptionMenu, device.Plus, 0);
+ controller.SetBinding(EnumCommand.SelectItemDown, device.Down, 0);
+ controller.SetBinding(EnumCommand.SelectItemLeft, device.Left, 0);
+ controller.SetBinding(EnumCommand.SelectItemRight, device.Right, 0);
+ controller.SetBinding(EnumCommand.SelectItemUp, device.Up, 0);
+
+ controller.SetBinding(EnumCommand.SelectItemDown, device.LeftStick.Down, 1);
+ controller.SetBinding(EnumCommand.SelectItemLeft, device.LeftStick.Left, 1);
+ controller.SetBinding(EnumCommand.SelectItemRight, device.LeftStick.Right, 1);
+ controller.SetBinding(EnumCommand.SelectItemUp, device.LeftStick.Up, 1);
+ }
}
}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs
new file mode 100644
index 00000000..f5836d7e
--- /dev/null
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs
@@ -0,0 +1,34 @@
+锘縰sing AxibugProtobuf;
+
+namespace AxibugEmuOnline.Client.InputDevices
+{
+ public class SwitchJoyCon_D : InputDevice_D
+ {
+ public Button_C LeftSL;
+ public Button_C LeftSR;
+ public Button_C RightSL;
+ public Button_C RightSR;
+
+ public Button_C B;
+ public Button_C A;
+ public Button_C Y;
+ public Button_C X;
+
+ public Button_C Up;
+ public Button_C Down;
+ public Button_C Left;
+ public Button_C Right;
+
+ public Button_C Minus;
+ public Button_C Plus;
+
+ public Stick_C LeftStick;
+ public Stick_C RightStick;
+ public Button_C LeftStickPress;
+ public Button_C RightStickPress;
+
+ public SwitchJoyCon_D(InputResolver resolver) : base(resolver) { }
+
+ public override GamePadType PadType => GamePadType.SwitchJoyCon;
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs.meta
new file mode 100644
index 00000000..0fe358eb
--- /dev/null
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/Devices/SwitchJoyCon_D.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 28380f06191bd35458b20113fbd2960b
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/InputDevicesManager.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/InputDevicesManager.cs
index 458ecc84..5bb9f530 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/InputDevicesManager.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/InputDevicesManager.cs
@@ -1,5 +1,6 @@
锘縰sing System.Collections.Generic;
using UnityEngine;
+using UnityEngine.InputSystem;
namespace AxibugEmuOnline.Client.InputDevices
{
@@ -72,11 +73,48 @@ namespace AxibugEmuOnline.Client.InputDevices
{
return m_devices.Values;
}
-
+ List templog = new List();
/// 鐢卞閮ㄩ┍鍔ㄧ殑閫昏緫鏇存柊鍏ュ彛
public void Update()
{
foreach (var device in m_devices.Values) device.Update();
+
+ //string HadDrive = "";
+ //foreach (var device in InputSystem.devices)
+ //{
+ // if (device is Mouse)
+ // continue;
+ // bool bhadflag = false;
+
+ // templog.Clear();
+ // for (int i = 0; i < device.allControls.Count; i++)
+ // {
+ // if (device.allControls[i].IsPressed(0))
+ // {
+ // if (device.allControls[i].name.ToLower() == "anykey")
+ // continue;
+ // bhadflag = true;
+ // string keyname = $"{device.allControls[i].GetType().FullName}|{device.allControls[i].name},";
+ // templog.Add(keyname);
+ // }
+ // }
+
+ // if (bhadflag)
+ // {
+ // HadDrive += $" D:{device.GetType().FullName}|{device.GetType().BaseType.FullName}|{device.name}, K:";
+ // foreach (var s in templog)
+ // {
+ // HadDrive += s;
+ // }
+ // }
+
+ //}
+
+ //if (!string.IsNullOrEmpty(HadDrive))
+ //{
+ // Debug.Log($"Had Drive: {HadDrive}");
+ //}
+
}
}
}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/InputResolver/InputSystemResolver.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/InputResolver/InputSystemResolver.cs
index 0e9f910a..af6ff057 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/InputResolver/InputSystemResolver.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/InputDevicesManager/InputResolver/InputSystemResolver.cs
@@ -1,8 +1,18 @@
锘#if ENABLE_INPUT_SYSTEM
+
+#if UNITY_EDITOR || UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_WSA || PACKAGE_DOCS_GENERATION
+#define DUALSHOCK_SUPPORT
+#endif
+
+#if UNITY_EDITOR || UNITY_SWITCH || PACKAGE_DOCS_GENERATION
+#define JOYCON_SUPPORT
+#endif
+
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.DualShock;
+using UnityEngine.InputSystem.Switch;
using UnityEngine.InputSystem.XInput;
namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem
@@ -24,25 +34,25 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem
InputDevice_D newDevice = null;
if (ipdev is Keyboard) newDevice = new Keyboard_D(this);
-
-#if UNITY_STANDALONE || UNITY_PS5 || UNITY_PS4 || UNITY_PS3 //PC/Mac/Linux/PS345 鎵嶈兘鐢 DualShock
+#if DUALSHOCK_SUPPORT
else if (ipdev is DualShockGamepad)
{
if (ipdev is DualShock3GamepadHID) newDevice = new DualShockController_D(this, ps3: true);
else if (ipdev is DualShock4GamepadHID) newDevice = new DualShockController_D(this, ps4: true);
else if (ipdev is DualSenseGamepadHID) newDevice = new DualShockController_D(this, ps5: true);
else newDevice = new DualShockController_D(this);
-
}
#endif
-
-#if UNITY_STANDALONE_WIN //浠匴indows 鎵嶈兘鐢╔input
else if (ipdev is XInputController)
{
newDevice = new XboxController_D(this);
}
+#if JOYCON_SUPPORT
+ else if (ipdev is NPad)
+ {
+ newDevice = new SwitchJoyCon_D(this);
+ }
#endif
-
else if (ipdev is Gamepad) newDevice = new GamePad_D(this); //娉ㄦ剰Gamepad鐨勪紭鍏堢骇,鍥犱负浠讳綍鎵嬫焺,Inputsystem涓殑鍩虹被閮芥槸GamePad
if (newDevice != null)
@@ -240,6 +250,7 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem
mapper[keyboard_d.Semicolon] = ipKeyboard.semicolonKey;
mapper[keyboard_d.Quote] = ipKeyboard.quoteKey;
}
+#if DUALSHOCK_SUPPORT
else if (device_d is DualShockController_D ds_d)
{
var ipDsGamePad = ipdevice as DualShockGamepad;
@@ -263,6 +274,7 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem
mapper[ds_d.LeftStick] = ipDsGamePad.leftStick;
mapper[ds_d.RightStick] = ipDsGamePad.rightStick;
}
+#endif
else if (device_d is XboxController_D xbox_d)
{
var ipXInputGamePad = ipdevice as XInputController;
@@ -284,53 +296,53 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem
mapper[xbox_d.RightStickPress] = ipXInputGamePad.rightStickButton;
mapper[xbox_d.LeftStick] = ipXInputGamePad.leftStick;
mapper[xbox_d.RightStick] = ipXInputGamePad.rightStick;
-
}
+#if JOYCON_SUPPORT
+ else if (device_d is SwitchJoyCon_D joycon_d)
+ {
+ var ipdevice_joycon = ipdevice as NPad;
+ mapper[joycon_d.LeftSL] = ipdevice_joycon.leftSL;
+ mapper[joycon_d.LeftSR] = ipdevice_joycon.leftSR;
+ mapper[joycon_d.RightSL] = ipdevice_joycon.rightSL;
+ mapper[joycon_d.RightSR] = ipdevice_joycon.rightSR;
+ mapper[joycon_d.B] = ipdevice_joycon.bButton;
+ mapper[joycon_d.A] = ipdevice_joycon.aButton;
+ mapper[joycon_d.Y] = ipdevice_joycon.yButton;
+ mapper[joycon_d.X] = ipdevice_joycon.xButton;
+ mapper[joycon_d.Up] = ipdevice_joycon.dpad.up;
+ mapper[joycon_d.Down] = ipdevice_joycon.dpad.down;
+ mapper[joycon_d.Left] = ipdevice_joycon.dpad.left;
+ mapper[joycon_d.Right] = ipdevice_joycon.dpad.right;
+ mapper[joycon_d.Minus] = ipdevice_joycon.selectButton;
+ mapper[joycon_d.Plus] = ipdevice_joycon.startButton;
+ mapper[joycon_d.LeftStick] = ipdevice_joycon.leftStick;
+ mapper[joycon_d.RightStick] = ipdevice_joycon.rightStick;
+ mapper[joycon_d.RightStickPress] = ipdevice_joycon.rightStickButton;
+ mapper[joycon_d.LeftStickPress] = ipdevice_joycon.leftStickButton;
+ }
+#endif
else if (device_d is GamePad_D gamepad_d)
{
- if (ipdevice is UnityEngine.InputSystem.Switch.NPad ipdevice_ns)
- {
- mapper[gamepad_d.Up] = ipdevice_ns.dpad.up;
- mapper[gamepad_d.Down] = ipdevice_ns.dpad.down;
- mapper[gamepad_d.Left] = ipdevice_ns.dpad.left;
- mapper[gamepad_d.Right] = ipdevice_ns.dpad.right;
- mapper[gamepad_d.Select] = ipdevice_ns.selectButton;
- mapper[gamepad_d.Start] = ipdevice_ns.startButton;
- mapper[gamepad_d.North] = ipdevice_ns.xButton;
- mapper[gamepad_d.South] = ipdevice_ns.bButton;
- mapper[gamepad_d.West] = ipdevice_ns.yButton;
- mapper[gamepad_d.East] = ipdevice_ns.aButton;
- mapper[gamepad_d.LeftShoulder] = ipdevice_ns;
- mapper[gamepad_d.RightShoulder] = ipdevice_ns.rightShoulder;
- mapper[gamepad_d.LeftTrigger] = ipdevice_ns.leftTrigger;
- mapper[gamepad_d.RightTrigger] = ipdevice_ns.rightTrigger;
- mapper[gamepad_d.LeftStickPress] = ipdevice_ns.leftStickButton;
- mapper[gamepad_d.RightStickPress] = ipdevice_ns.rightStickButton;
- mapper[gamepad_d.LeftStick] = ipdevice_ns.leftStick;
- mapper[gamepad_d.RightStick] = ipdevice_ns.rightStick;
- }
- else
- {
- var ipGamepad = ipdevice as Gamepad;
- mapper[gamepad_d.Up] = ipGamepad.dpad.up;
- mapper[gamepad_d.Down] = ipGamepad.dpad.down;
- mapper[gamepad_d.Left] = ipGamepad.dpad.left;
- mapper[gamepad_d.Right] = ipGamepad.dpad.right;
- mapper[gamepad_d.Select] = ipGamepad.selectButton;
- mapper[gamepad_d.Start] = ipGamepad.startButton;
- mapper[gamepad_d.North] = ipGamepad.buttonNorth;
- mapper[gamepad_d.South] = ipGamepad.buttonSouth;
- mapper[gamepad_d.West] = ipGamepad.buttonWest;
- mapper[gamepad_d.East] = ipGamepad.buttonEast;
- mapper[gamepad_d.LeftShoulder] = ipGamepad.leftShoulder;
- mapper[gamepad_d.RightShoulder] = ipGamepad.rightShoulder;
- mapper[gamepad_d.LeftTrigger] = ipGamepad.leftTrigger;
- mapper[gamepad_d.RightTrigger] = ipGamepad.rightTrigger;
- mapper[gamepad_d.LeftStickPress] = ipGamepad.leftStickButton;
- mapper[gamepad_d.RightStickPress] = ipGamepad.rightStickButton;
- mapper[gamepad_d.LeftStick] = ipGamepad.leftStick;
- mapper[gamepad_d.RightStick] = ipGamepad.rightStick;
- }
+ var ipGamepad = ipdevice as Gamepad;
+ mapper[gamepad_d.Up] = ipGamepad.dpad.up;
+ mapper[gamepad_d.Down] = ipGamepad.dpad.down;
+ mapper[gamepad_d.Left] = ipGamepad.dpad.left;
+ mapper[gamepad_d.Right] = ipGamepad.dpad.right;
+ mapper[gamepad_d.Select] = ipGamepad.selectButton;
+ mapper[gamepad_d.Start] = ipGamepad.startButton;
+ mapper[gamepad_d.North] = ipGamepad.buttonNorth;
+ mapper[gamepad_d.South] = ipGamepad.buttonSouth;
+ mapper[gamepad_d.West] = ipGamepad.buttonWest;
+ mapper[gamepad_d.East] = ipGamepad.buttonEast;
+ mapper[gamepad_d.LeftShoulder] = ipGamepad.leftShoulder;
+ mapper[gamepad_d.RightShoulder] = ipGamepad.rightShoulder;
+ mapper[gamepad_d.LeftTrigger] = ipGamepad.leftTrigger;
+ mapper[gamepad_d.RightTrigger] = ipGamepad.rightTrigger;
+ mapper[gamepad_d.LeftStickPress] = ipGamepad.leftStickButton;
+ mapper[gamepad_d.RightStickPress] = ipGamepad.rightStickButton;
+ mapper[gamepad_d.LeftStick] = ipGamepad.leftStick;
+ mapper[gamepad_d.RightStick] = ipGamepad.rightStick;
+
}
else throw new System.NotImplementedException($"鍒濆鍖栬澶囧け璐,鏈疄鐜扮殑鐗╃悊鎸夐敭鏄犲皠 for {device_d.GetType()}");
}
@@ -339,6 +351,6 @@ namespace AxibugEmuOnline.Client.InputDevices.ForInputSystem
m_deviceMapper.Remove(keyboard_d);
}
}
-
}
+
#endif
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs
index f9fe714e..6e55d328 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFile.cs
@@ -52,7 +52,7 @@ namespace AxibugEmuOnline.Client
}
}
- public SimpleFSM.State GetState()
+ public SimpleFSM.State GetCurrentState()
{
return FSM.CurrentState;
}
@@ -63,7 +63,7 @@ namespace AxibugEmuOnline.Client
/// 瀛樻。椤哄簭鍙,鐢ㄤ簬鍒ゆ柇浜戝瓨妗e拰鏈湴瀛樻。鐨勫悓姝ョ姸鎬,鏄惁瀛樺湪鍐茬獊
public uint Sequecen { get; private set; }
- SimpleFSM FSM;
+ public SimpleFSM FSM { get; private set; }
byte[] m_savDataCaches;
byte[] m_screenShotCaches;
Header m_headerCache;
@@ -79,8 +79,10 @@ namespace AxibugEmuOnline.Client
FSM.AddState();//锛
FSM.AddState();
FSM.AddState();
+ FSM.AddState();
FSM.AddState();
FSM.AddState();
+ FSM.AddState();
FSM.OnStateChanged += FSM_OnStateChanged;
IsEmpty = !AxiIO.File.Exists(FilePath);
@@ -217,7 +219,7 @@ namespace AxibugEmuOnline.Client
///
public void TrySync()
{
- if (FSM.CurrentState is not IdleState && FSM.CurrentState is not SyncedState) return;
+ if (FSM.CurrentState is not IdleState && FSM.CurrentState is not SyncedState && FSM.CurrentState is not SyncFailedState) return;
FSM.ChangeState();
}
@@ -234,6 +236,11 @@ namespace AxibugEmuOnline.Client
SyncingFilesUtility.Remove(this);
}
+ public override string ToString()
+ {
+ return $"{EmuPlatform}|{RomID}|{SlotIndex}";
+ }
+
public static class SyncingFilesUtility
{
static SyncingFileRecord m_syncFiles = new SyncingFileRecord();
@@ -315,7 +322,6 @@ namespace AxibugEmuOnline.Client
var jsonStr = JsonUtility.ToJson(temp);
AxiPlayerPrefs.SetString("SYNCING_SAVE", jsonStr);
}
-
}
[Serializable]
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingState.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingState.cs
index 747eff1d..49bc45d4 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingState.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/CheckingState.cs
@@ -29,7 +29,8 @@ namespace AxibugEmuOnline.Client
m_timeOut -= Time.deltaTime;
if (m_timeOut < 0) //宸茶秴鏃
{
- FSM.ChangeState();
+ FSM.GetState().Error = "鎷夊彇浜戝瓨妗f暟鎹秴鏃";
+ FSM.ChangeState();
}
}
@@ -44,7 +45,15 @@ namespace AxibugEmuOnline.Client
}
else
{
- FSM.ChangeState();
+ if (Host.Sequecen > (uint)NetData.Sequence)//鏈湴搴忓垪鍙峰ぇ浜庝簯瀛樻。搴忓垪鍙凤紝瑙嗕负鍐茬獊
+ {
+ FSM.GetState().NetData = NetData;
+ FSM.ChangeState();
+ }
+ else
+ {
+ FSM.ChangeState();
+ }
}
}
}
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/ConflictState.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/ConflictState.cs
index bda56747..1d510479 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/ConflictState.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/ConflictState.cs
@@ -1,4 +1,5 @@
锘縰sing AxibugEmuOnline.Client.Tools;
+using AxibugProtobuf;
namespace AxibugEmuOnline.Client
{
@@ -6,7 +7,7 @@ namespace AxibugEmuOnline.Client
{
public class ConflictState : SimpleFSM.State
{
-
+ public Protobuf_Mine_GameSavInfo NetData { get; set; }
}
}
}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs
index fa3c0924..1194c946 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/DownloadingState.cs
@@ -1,5 +1,6 @@
锘縰sing AxibugEmuOnline.Client.ClientCore;
using AxibugEmuOnline.Client.Tools;
+using AxibugProtobuf;
using System;
namespace AxibugEmuOnline.Client
@@ -14,14 +15,14 @@ namespace AxibugEmuOnline.Client
public override void OnEnter(SimpleFSM.State preState)
{
- var checkState = preState as CheckingState;
-
- var netData = checkState.NetData;
-
- if (Host.Sequecen >= (uint)netData.Sequence)
+ Protobuf_Mine_GameSavInfo netData = null;
+ if (preState is CheckingState checkState)
{
- FSM.ChangeState();
- return;
+ netData = checkState.NetData;
+ }
+ else if (preState is ConflictState conflictState) //鐢卞啿绐佺姸鎬佽浆鎹负涓嬭浇鐘舵侊紝浠h〃浣跨敤缃戠粶瀛樻。瑕嗙洊鏈湴
+ {
+ netData = conflictState.NetData;
}
m_sequece = (uint)netData.Sequence;
@@ -42,7 +43,8 @@ namespace AxibugEmuOnline.Client
if (m_downloadTask.downloadHandler.bHadErr) //涓嬭浇澶辫触
{
- FSM.ChangeState();
+ FSM.GetState().Error = m_downloadTask.downloadHandler.ErrInfo;
+ FSM.ChangeState();
return;
}
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/SyncFailedState.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/SyncFailedState.cs
new file mode 100644
index 00000000..85edfd09
--- /dev/null
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/SyncFailedState.cs
@@ -0,0 +1,18 @@
+锘縰sing AxibugEmuOnline.Client.ClientCore;
+using AxibugEmuOnline.Client.Tools;
+
+namespace AxibugEmuOnline.Client
+{
+ public partial class SaveFile
+ {
+ public class SyncFailedState : SimpleFSM.State
+ {
+ public string Error { get; set; }
+
+ public override void OnEnter(SimpleFSM.State preState)
+ {
+ App.log.Error($"鍚屾澶辫触:{Error}");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/SyncFailedState.cs.meta b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/SyncFailedState.cs.meta
new file mode 100644
index 00000000..11efab87
--- /dev/null
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SaveFileSyncStates/SyncFailedState.cs.meta
@@ -0,0 +1,2 @@
+fileFormatVersion: 2
+guid: 36be8767f260af04ba9ed88d2d4cd775
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SimpleSFM.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SimpleSFM.cs
index fbc21f5b..b33efc73 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SimpleSFM.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Manager/SaveSlotManager/SimpleSFM.cs
@@ -7,7 +7,10 @@ namespace AxibugEmuOnline.Client.Tools
public partial class SimpleFSM
{
public event Action OnStateChanged;
+
private Dictionary m_states = new Dictionary();
+ private bool isInTransition = false; // 鏂板锛氭爣璇嗘槸鍚﹀浜庡垏鎹㈣繃绋嬩腑
+ private Queue pendingStateQueue = new Queue(); // 鏂板锛氬欢杩熻姹傜殑闃熷垪
public HOST Host { get; private set; }
@@ -16,15 +19,15 @@ namespace AxibugEmuOnline.Client.Tools
Host = host;
}
- private State m_current;
+ private State m_currentState;
public State CurrentState
{
- get => m_current;
+ get => m_currentState;
set
{
- if (m_current == value) return;
+ if (m_currentState == value) return;
- m_current = value;
+ m_currentState = value;
OnStateChanged?.Invoke();
}
}
@@ -40,44 +43,59 @@ namespace AxibugEmuOnline.Client.Tools
return (T)state;
}
- public void BackToLast()
- {
- if (m_current == null) return;
- if (m_current.LastState == null) return;
-
- if (m_states.Values.FirstOrDefault(s => s == m_current.LastState) is State lastState)
- {
- m_current.LastState = null;
- m_current.OnExit(lastState);
-
- lastState.OnEnter(m_current);
- m_current = lastState;
- }
- }
-
- public void Stop()
- {
- if (m_current != null)
- {
- m_current.OnExit(null);
- m_current = null;
- }
-
- foreach (var state in m_states.Values)
- state.LastState = null;
- }
-
+
public void ChangeState() where T : State, new()
{
var stateType = typeof(T);
- m_states.TryGetValue(stateType, out State nextState);
+ if (!m_states.ContainsKey(stateType))
+ return;
+ // 濡傛灉澶勪簬鍒囨崲涓紝鍔犲叆闃熷垪绛夊緟鍚庣画澶勭悊
+ if (isInTransition)
+ {
+ pendingStateQueue.Enqueue(stateType);
+ return;
+ }
+
+ // 鏍囪寮濮嬪垏鎹
+ isInTransition = true;
+ InternalChangeState(stateType);
+ isInTransition = false; // 鍒囨崲缁撴潫
+
+ // 澶勭悊闃熷垪涓Н绱殑鍒囨崲璇锋眰
+ ProcessPendingQueue();
+ }
+
+ // 鏂板锛氬疄闄呮墽琛岀姸鎬佸垏鎹㈢殑鏂规硶
+ private void InternalChangeState(Type stateType)
+ {
+ State nextState = m_states[stateType];
if (nextState == null) return;
- if (m_current != null) m_current.OnExit(nextState);
- nextState.LastState = m_current;
- nextState.OnEnter(m_current);
- m_current = nextState;
+ State preState = CurrentState;
+ // 閫鍑哄綋鍓嶇姸鎬
+ if (preState != null) preState.OnExit(nextState);
+
+ // 鏇存柊褰撳墠鐘舵
+ CurrentState = nextState;
+ CurrentState.LastState = preState;
+
+ // 杩涘叆鏂扮姸鎬
+ CurrentState.OnEnter(preState);
+ }
+
+ // 鏂板锛氬鐞嗛槦鍒椾腑鐨勫垏鎹㈣姹
+ private void ProcessPendingQueue()
+ {
+ while (pendingStateQueue.Count > 0)
+ {
+ Type nextType = pendingStateQueue.Dequeue();
+ if (!m_states.ContainsKey(nextType)) continue;
+
+ isInTransition = true;
+ InternalChangeState(nextType);
+ isInTransition = false;
+ }
}
public T GetState() where T : State, new()
@@ -88,11 +106,11 @@ namespace AxibugEmuOnline.Client.Tools
public void Update()
{
- m_current?.OnUpdate();
+ CurrentState?.OnUpdate();
foreach (var state in m_states.Values)
{
- if (state == m_current) continue;
- state.AnyStateUpdate(m_current);
+ if (state == CurrentState) continue;
+ state.AnyStateUpdate(CurrentState);
}
}
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Switch/SwitchCommon.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Switch/SwitchCommon.cs
index e28f5ee2..d0d6e381 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Switch/SwitchCommon.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/Switch/SwitchCommon.cs
@@ -1,9 +1,11 @@
锘縰sing AxibugEmuOnline.Client;
+using AxibugEmuOnline.Client.ClientCore;
using UnityEngine;
public class SwitchCommon : MonoBehaviour
{
void Start()
{
+ Debug.Log("SwitchCommon Start");
TickLoop.LoopAction_15s += ApplyCommit;
}
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs
index 2494aeb1..e235e0eb 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/UI/InGameUI/InGameUI_SaveStateMenu.cs
@@ -33,17 +33,23 @@ namespace AxibugEmuOnline.Client
public override Type MenuUITemplateType => typeof(OptionUI_SavSlotItem);
public SaveFile SavFile { get; private set; }
- List m_subOptions = new List();
public override string Name => SavFile.AutoSave ? "鑷姩瀛樻。" : $"瀛樻。{SavFile.SlotIndex}";
+ SaveMenuItem saveMENU;
+ LoadMenuItem loadMENU;
+ RetryMenuItem retryMENU;
+ UseLocalSaveMenuItem useLocalMENU;
+ UseRemoteSaveMenuItem useRemoteMENU;
+
public SaveSlotMenu(InGameUI inGameui, SaveFile savFile)
{
SavFile = savFile;
- //闈炶嚜鍔ㄥ瓨妗,澧炲姞淇濆瓨閫夐」
- if (!savFile.AutoSave) m_subOptions.Add(new SaveMenuItem(inGameui, savFile));
- //娣诲姞璇诲彇閫夐」
- m_subOptions.Add(new LoadMenuItem(inGameui, savFile));
+ saveMENU = new SaveMenuItem(inGameui, savFile);
+ loadMENU = new LoadMenuItem(inGameui, savFile);
+ retryMENU = new RetryMenuItem(inGameui, savFile);
+ useLocalMENU = new UseLocalSaveMenuItem(inGameui, savFile);
+ useRemoteMENU = new UseRemoteSaveMenuItem(inGameui, savFile);
}
public override void OnShow(OptionUI_MenuItem ui)
@@ -55,7 +61,21 @@ namespace AxibugEmuOnline.Client
protected override List GetOptionMenus()
{
- return m_subOptions;
+ var menus = new List();
+
+ if (SavFile.GetCurrentState() is SaveFile.ConflictState)
+ {
+ menus.Add(useRemoteMENU);
+ menus.Add(useLocalMENU);
+ }
+ else
+ {
+ if (SavFile.GetCurrentState() is SaveFile.SyncFailedState) menus.Add(retryMENU);
+ if (!SavFile.AutoSave) menus.Add(saveMENU);
+ if (!SavFile.IsEmpty) menus.Add(loadMENU);
+ }
+
+ return menus;
}
public class SaveMenuItem : ExecuteMenu
@@ -111,6 +131,66 @@ namespace AxibugEmuOnline.Client
OverlayManager.HideSideBar();
}
}
+
+ public class RetryMenuItem : ExecuteMenu
+ {
+ SaveFile m_savFile;
+ InGameUI m_ingameUI;
+ public override string Name => "閲嶈瘯";
+ public override bool Visible => m_savFile.GetCurrentState() is SaveFile.SyncFailedState;
+
+ public RetryMenuItem(InGameUI inGameui, SaveFile savFile)
+ {
+ m_ingameUI = inGameui;
+ m_savFile = savFile;
+ }
+
+ public override void OnExcute(OptionUI optionUI, ref bool cancelHide)
+ {
+ cancelHide = true;
+ m_savFile.TrySync();
+ }
+ }
+
+ public class UseRemoteSaveMenuItem : ExecuteMenu
+ {
+ SaveFile m_savFile;
+ InGameUI m_ingameUI;
+ public override string Name => "浣跨敤浜戠瀛樻。";
+
+ public UseRemoteSaveMenuItem(InGameUI inGameui, SaveFile savFile)
+ {
+ m_ingameUI = inGameui;
+ m_savFile = savFile;
+ }
+
+ public override void OnExcute(OptionUI optionUI, ref bool cancelHide)
+ {
+ if (m_savFile.GetCurrentState() is not SaveFile.ConflictState) return;
+ cancelHide = true;
+ m_savFile.FSM.ChangeState();
+ }
+ }
+
+ public class UseLocalSaveMenuItem : ExecuteMenu
+ {
+ SaveFile m_savFile;
+ InGameUI m_ingameUI;
+ public override string Name => "浣跨敤鏈湴瀛樻。";
+
+ public UseLocalSaveMenuItem(InGameUI inGameui, SaveFile savFile)
+ {
+ m_ingameUI = inGameui;
+ m_savFile = savFile;
+ }
+
+ public override void OnExcute(OptionUI optionUI, ref bool cancelHide)
+ {
+ if (m_savFile.GetCurrentState() is not SaveFile.ConflictState) return;
+ cancelHide = true;
+ m_savFile.FSM.ChangeState();
+ }
+ }
}
}
}
\ No newline at end of file
diff --git a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/UI/OptionUI/OptionUI_SavSlotItem.cs b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/UI/OptionUI/OptionUI_SavSlotItem.cs
index 50eafcac..8bbffddb 100644
--- a/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/UI/OptionUI/OptionUI_SavSlotItem.cs
+++ b/AxibugEmuOnline.Client.Switch/Assets/Script/AppMain/UI/OptionUI/OptionUI_SavSlotItem.cs
@@ -14,7 +14,10 @@ namespace AxibugEmuOnline.Client
public Text UI_SavTime;
public GameObject UI_Disconnect;
- public GameObject UI_Syncing;
+ public GameObject UI_DownloadError;
+ public GameObject UI_Downloading;
+ public GameObject UI_Uploading;
+ public GameObject UI_Checking;
public GameObject UI_Conflict;
public GameObject UI_Synced;
@@ -24,12 +27,13 @@ namespace AxibugEmuOnline.Client
private void Awake()
{
- m_stateNodes[typeof(SaveFile.CheckingState)] = UI_Syncing;
+ m_stateNodes[typeof(SaveFile.CheckingState)] = UI_Checking;
m_stateNodes[typeof(SaveFile.ConflictState)] = UI_Conflict;
- m_stateNodes[typeof(SaveFile.DownloadingState)] = UI_Syncing;
+ m_stateNodes[typeof(SaveFile.DownloadingState)] = UI_Downloading;
m_stateNodes[typeof(SaveFile.SyncedState)] = UI_Synced;
- m_stateNodes[typeof(SaveFile.UploadingState)] = UI_Syncing;
+ m_stateNodes[typeof(SaveFile.UploadingState)] = UI_Uploading;
m_stateNodes[typeof(SaveFile.CheckingNetworkState)] = UI_Disconnect;
+ m_stateNodes[typeof(SaveFile.SyncFailedState)] = UI_DownloadError;
}
protected override void OnSetData(InternalOptionMenu menuData)
@@ -80,7 +84,7 @@ namespace AxibugEmuOnline.Client
private void UpdateStateNode()
{
- var stateType = MenuData.SavFile.GetState().GetType();
+ var stateType = MenuData.SavFile.GetCurrentState().GetType();
foreach (var item in m_stateNodes)
{