Devarc is cross-platform development templates.
- Windows development evironment.
- PC, Mobile, WebGL client platforms.
- NodeJS, CSharp servers.
- MySQL database.
- Protocol builder.
- Table builder.
- Unity: Asset Management.
- Unity: Simple sound manager.
- Unity: Simple effect manager.
- Unity: Simple animation manager.
- Unity: Simple data encryption.
- https://github.com/Cysharp/MemoryPack.git?path=src/MemoryPack.Unity/Assets/MemoryPack.Unity#v1.21.4
- https://github.com/devwinsoft/devarc/tree/main/install
- https://github.com/psygames/UnityWebSocket
- Firebase SDK
- https://github.com/devwinsoft/devarc/tree/main/src/Devarc.Net.Common
- https://github.com/devwinsoft/devarc/tree/main/src/Devarc.Net.Server
- https://github.com/sta/websocket-sharp
- Now, working...
public enum ErrorType
{
SUCCESS = 0,
UNKNOWN = 1,
SERVER_ERROR = 2,
SESSION_EXPIRED = 3,
}// Protocol from:Client to:AuthServer
namespace C2Auth
{
public class RequestLogin
{
public string accountID;
public string password;
}
}
// Protocol from:AuthServer to:Client
namespace Auth2C
{
public class NotifyLogin
{
public ErrorType errorCode;
public string sessionID;
public int secret;
}
}IDL.exe -cs-def {SchemaFolder}\Common.def
IDL.exe -js {SchemaFolder}\AuthProtocol.idl {SchemaFolder}\Common.def
TableBuilder.exe -cs {SchemaFolder}\SoundTable.xlsx
move /Y *.cs {UnityProjectFolder}\Assets\Scripts\Generated\
..\..\bin\TableBuilder.exe -cs .\Tables\GameTable.xlsx
move /Y *.cs ..\UnityClient\Assets\Example\Scripts\Generated\Tables\
..\..\bin\TableBuilder.exe -json .\Tables\GameTable.xlsx
move /Y *.json ..\UnityClient\Assets\Example\Bundles\Tables\
..\..\bin\TableBuilder.exe -sql .\Tables\GameTable.xlsx
move /Y *.ddl ..\Database\Tables\
move /Y *.sql ..\Database\Tables\
void Awake()
{
// Initialize TableManager.
TableManager.Create();
TableManager.Instance.OnError += (errorType, args) =>
{
// Error handling...
};
// Initialize DownloadManager.
#if !UNITY_EDITOR
DownloadManager.Instance.AddToPatchList("table-bin");
DownloadManager.Instance.AddToPatchList("lstring-bin");
#endif
DownloadManager.Instance.AddToPatchList("effect");
DownloadManager.Instance.AddToPatchList("sound");
DownloadManager.Instance.OnPatch += (info) =>
{
DownloadManager.Instance.BeginDownload();
};
DownloadManager.Instance.OnResult += () =>
{
// Load bundles...
StartCoroutine(loadAssets());
};
DownloadManager.Instance.OnError += () =>
{
// Error handling...
};
// Begin patch process.
//DownloadManager.Instance.BeginPatch();
}IEnumerator loadAssets()
{
// Load resouce assets...
TableManager.Instance.LoadResourceTable();
TableManager.Instance.LoadResourceString(SystemLanguage.English);
SoundManager.Instance.LoadResource();
// Load bundle assets...
#if UNITY_EDITOR
yield return TableManager.Instance.LoadBundleTable("table-json", TableFormatType.JSON);
yield return TableManager.Instance.LoadBundleString("lstring-json", TableFormatType.JSON, SystemLanguage.English);
#else
yield return TableManager.Instance.LoadBundleTable("table-bin", TableFormatType.BIN);
yield return TableManager.Instance.LoadBundleString("lstring-bin", TableFormatType.BIN, SystemLanguage.English);
#endif
yield return EffectManager.Instance.LoadBundle("effect");
yield return SoundManager.Instance.LoadBundle("sound");
}void unloadAssets()
{
// Unload resource assets...
TableManager.Instance.UnloadResourceTable();
TableManager.Instance.UnloadResourceString();
SoundManager.Instance.UnloadResource();
// Unload bundle assets...
#if UNITY_EDITOR
TableManager.Instance.UnloadBundleTable("table-json");
TableManager.Instance.UnloadBundleString("lstring-json");
#else
TableManager.Instance.UnloadBundleTable("table-bin");
TableManager.Instance.UnloadBundleString("lstring-bin");
#endif
EffectManager.Instance.UnloadBundle("effect");
SoundManager.Instance.UnloadBundle("sound");
}Devarc is provided under [Apache License 2.0].


