{"id":13534079,"url":"https://github.com/AlexMeesters/unity-appwrite-plugin","last_synced_at":"2025-04-01T22:31:11.419Z","repository":{"id":63686083,"uuid":"567021832","full_name":"AlexMeesters/unity-appwrite-plugin","owner":"AlexMeesters","description":"Unofficial \u0026 non affiliated Appwrite plugin for Unity","archived":true,"fork":false,"pushed_at":"2023-02-28T10:12:26.000Z","size":1390,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-02T21:31:55.195Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexMeesters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-11-16T22:46:22.000Z","updated_at":"2024-10-15T17:29:43.000Z","dependencies_parsed_at":"2024-01-14T02:33:19.240Z","dependency_job_id":"64074097-03d5-4865-93c0-9c6b4dad673e","html_url":"https://github.com/AlexMeesters/unity-appwrite-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexMeesters%2Funity-appwrite-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexMeesters%2Funity-appwrite-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexMeesters%2Funity-appwrite-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexMeesters%2Funity-appwrite-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexMeesters","download_url":"https://codeload.github.com/AlexMeesters/unity-appwrite-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246720481,"owners_count":20822912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T07:01:26.160Z","updated_at":"2025-04-01T22:31:11.026Z","avatar_url":"https://github.com/AlexMeesters.png","language":"C#","readme":"## Unofficial \u0026 non affiliated [Appwrite](https://github.com/appwrite/appwrite) plugin for Unity\n\n**Still in early development. Not yet battle tested.**\n\nSo far the Unity plugin for Appwrite supports some of the account features. \\\nIt stores the session cookie automatically for you, meaning you keep your session even upon restart.\n\nCurrent features\n - Login\n - Get user information\n - Get JWT token\n - Register user\n - Send verification mail\n - Store cookies on disk automatically\n - Simple AES Encryption for stored data\n\nDependencies\n - [UniTask](https://github.com/Cysharp/UniTask) for lower allocation counts \u0026 WebGL support\n - JSON . Net for JSON support\n  \n## Included menu\n  \n![Menu Example](https://github.com/AlexMeesters/unity-appwrite-plugin/blob/main/menu_example.png)\n\n## Getting started\n\n\n### Install UniTask\n\nThis package makes use of UniTask, a package that uses a lot less allocations for C# Tasks.  \nIt also makes deploying to WebGL easier as regular Tasks cause errors with WebGL.  \nTo install UniTask go here: https://github.com/Cysharp/UniTask#upm-package\n\n### Install JSON. Net\n\nJSON. Net is used to generate JSON for the requests, as well as deserialize responses from Appwrite.  \nReason I did not choose for the JsonUtility was because the underlying queries could still change,   \nand this allowed me to just fetch specific parameters.\n\n### To install JSON. Net\n\nAdd the following to the manifest.json in /YourProjectFolder/Packages/manifest.json  \n\"com.unity.nuget.newtonsoft-json\": \"3.0.2\",\n\n### Install TextMeshPro\n\nThe example menu makes use of TextMeshPro.\nGo to the package manager and locate TextMeshPro and install it.\n\n\n## Easy install using the Unity Package Manager\n```\nhttps://github.com/AlexMeesters/unity-appwrite-plugin.git?path=Assets/Plugins/Lowscope/Appwrite\n```\n\n## \n\nOnce the project is installed and no errors occur. Run the game, and a file called \"Appwrite Config\" should appear in the Resources folder.  \nConfigure it to connect to your Appwrite server.\n\n![Config Example](https://github.com/AlexMeesters/unity-appwrite-plugin/blob/main/config_example.png)\n\n### Code Example\n\n```csharp\n\nusing Lowscope.AppwritePlugin;\nusing Lowscope.AppwritePlugin.Accounts.Enums;\nusing Lowscope.AppwritePlugin.Accounts.Model;\nusing UnityEngine;\n\npublic class BasicUsage : MonoBehaviour\n{\n\tpublic async void Start()\n\t{\n\t\t// Get user info from disk -\u003e verify with server if session is valid. \n\t\t// -\u003e Not valid, then nullified.\n\t\tUser user = await Appwrite.Account.GetUser();\n\n\t\tif (user != null)\n\t\t{\n\t\t\tstring id = user.Id;\n\t\t\tstring name = user.Name;\n\t\t\tstring email = user.Email;\n\t\t\tbool verifiedEmail = user.EmailVerified;\n\t\t}\n\t}\n\n\tpublic async void Login(string email, string password)\n\t{\n\t\tvar (user, response) = await Appwrite.Account.Login(email, password);\n\n\t\tif (response == ELoginResponse.Success)\n\t\t{\n\t\t\t// Use user here.\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDebug.Log($\"Error occured: {response}\");\n\t\t}\n\t}\n\n\tpublic async void Register(string id, string name, string email, string password)\n\t{\n\t\tvar (user, response) = await Appwrite.Account.Register(id, name, email, password);\n\n\t\tif (response == ERegisterResponse.Success)\n\t\t{\n\t\t\t// Use user here\n\t\t\t// User can opt to send verify email directly after\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDebug.Log($\"Error occured: {response}\");\n\t\t}\n\t}\n\n\tpublic async void VerifyEmail()\n\t{\n\t\t// Sends request from current user session\n\t\tvar response = await Appwrite.Account.RequestVerificationMail();\n\n\t\tif (response == EEmailVerifyResponse.Sent)\n\t\t{\n\t\t\t// Email has been sent!\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDebug.Log($\"Error occured: {response}\");\n\t\t}\n\t}\n\n\tpublic async void GetJwt()\n\t{\n\t\t// Sends request from current user session\n\t\tvar jwt = await Appwrite.Account.ObtainJwt();\n\n\t\tif (!string.IsNullOrEmpty(jwt))\n\t\t{\n\t\t\t// Use the JWT. Cached based on duration specified in configuration.\n\t\t}\n\t}\n}\n\n```\n","funding_links":[],"categories":["Showcase (Built with Appwrite 📣)"],"sub_categories":["Unity"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexMeesters%2Funity-appwrite-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlexMeesters%2Funity-appwrite-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexMeesters%2Funity-appwrite-plugin/lists"}