{"id":15160775,"url":"https://github.com/sator-imaging/unity-fundamentals","last_synced_at":"2026-04-01T23:26:13.367Z","repository":{"id":228276235,"uuid":"773554184","full_name":"sator-imaging/Unity-Fundamentals","owner":"sator-imaging","description":"Unity Scripting Fundamentals","archived":false,"fork":false,"pushed_at":"2025-07-10T03:58:05.000Z","size":332,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-23T01:37:40.437Z","etag":null,"topics":["csharp","csharp-library","unity","unity-scripts","unity3d"],"latest_commit_sha":null,"homepage":"https://sator-imaging.github.io/Unity-Fundamentals/","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/sator-imaging.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["sator-imaging"]}},"created_at":"2024-03-18T00:32:01.000Z","updated_at":"2025-07-10T03:58:08.000Z","dependencies_parsed_at":"2024-08-12T03:47:57.866Z","dependency_job_id":"a7a954ca-3ba7-4078-bc10-403d990db780","html_url":"https://github.com/sator-imaging/Unity-Fundamentals","commit_stats":null,"previous_names":["sator-imaging/unity-lifecyclemanager","sator-imaging/unity-fundamentals"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/sator-imaging/Unity-Fundamentals","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sator-imaging%2FUnity-Fundamentals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sator-imaging%2FUnity-Fundamentals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sator-imaging%2FUnity-Fundamentals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sator-imaging%2FUnity-Fundamentals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sator-imaging","download_url":"https://codeload.github.com/sator-imaging/Unity-Fundamentals/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sator-imaging%2FUnity-Fundamentals/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274873613,"owners_count":25365824,"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","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["csharp","csharp-library","unity","unity-scripts","unity3d"],"created_at":"2024-09-26T23:22:57.863Z","updated_at":"2026-04-01T23:26:13.357Z","avatar_url":"https://github.com/sator-imaging.png","language":"C#","funding_links":["https://github.com/sponsors/sator-imaging"],"categories":[],"sub_categories":[],"readme":"[![DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/sator-imaging/Unity-Fundamentals)\n[![🇯🇵](https://img.shields.io/badge/API-Reference-blue)](https://sator-imaging.github.io/Unity-Fundamentals/api/index.html)\n\u0026nbsp;\n[![🇯🇵](https://img.shields.io/badge/🇯🇵-日本語_※詳説-789)](https://qiita.com/sator_imaging/items/235c8447f4171ba5a522)\n\u003c!--\n[![🇯🇵](https://img.shields.io/badge/🇯🇵-日本語-789)](./README.ja.md)\n[![🇨🇳](https://img.shields.io/badge/🇨🇳-简体中文-789)](./README.zh-CN.md)\n[![🇺🇸](https://img.shields.io/badge/🇺🇸-English-789)](./README.md)\n--\u003e\n\n\nUnity Scripting Fundamentals is designed to be minimal, efficient \u0026 dependency-free as possible.\nMost of scripts are .NET / Plain C# compliant. See `using` statements in `.cs` files for details.\n\n- 🧱 [Plain C# APIs](#-plain-c-apis)\n- 🎮 [Unity Runtime APIs](#-unity-runtime-apis)\n- 🖱️ [Unity Editor Extensions](#️-unity-editor-scripts)\n\n\u003e [!TIP]\n\u003e Licensed under the MIT License unless otherwise described.  \n\u003e Supported Unity version: Unity 2021.3+  \n\n\n# 📦 Installation\n\nAdd the following `git URL` in Unity Package Manager (UPM).\n\n![UPM](https://docs.unity3d.com/2020.3/Documentation/uploads/Main/PackageManagerUI-GitURLPackageButton.png)\n\n\n## 🏷️ Release version\n\nUse latest stable release.\n\n```\nhttps://github.com/sator-imaging/Unity-Fundamentals.git#latest\n```\n\nor use specific version (append desired version at the end: `#vX.Y.Z`).\n\n```\nhttps://github.com/sator-imaging/Unity-Fundamentals.git#v1.7.2\n```\n\n\n## 🦜 Canary/Nightly Build\n\n\u003e [!IMPORTANT]\n\u003e It's very experimental and may have breaking changes, bug or errors without notice.\n\n```\nhttps://github.com/sator-imaging/Unity-Fundamentals.git\n```\n\n\n\n\n\n\u0026nbsp;\n\n# 🧱 Plain C# APIs\n\n- `Fibers`  \nMicrothreading Library for .NET / Unity.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/Threading/Fibers.cs.html)\nor\n[日本語版](https://zenn.dev/sator_imaging/articles/0236e98fbbbc98)\n\n\n- `FiberScheduler`  \nTask scheduler with concurrency level control.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/api/SatorImaging.UnityFundamentals.FiberScheduler.html)\n\n\n- **Non-Alloc String Splitter**  \nSplit string without allocation.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/Text/NonAllocStringSplitter.cs.html)\nor\n[日本語版](https://qiita.com/sator_imaging/items/1393aa0efa3b064d77ec)\n\n\n- **Rx (Reactive Extensions) / Observable**  \nTransform `event Action\u003cT\u003e` to `IObservable\u003cT\u003e`.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/Reactive/ObservableEvent.cs.html)\n\n\n- **Easing Functions**: `EasingFloat` and `EasingDouble`  \nHigh performance easing functions (Unity Burst Compiler ready).\n[📘](https://x.com/sator_imaging/status/2035921437433966891)\n\n\n- `NetworkClock`  \nBelieve-worthy, device-independent time provider based on `HTTPS` connection.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/System/NetworkClock.cs.html)\nor\n[解説](https://zenn.dev/sator_imaging/articles/6e1bd822a82d31)\n\n\n- `HalfUlid`  \nhttps://github.com/sator-imaging/Half-Ulid\n\u0026nbsp;\n[実装の詳細](https://qiita.com/sator_imaging/items/576781d95367d5856624)\n\n\n- `Atom\u003cT\u003e`  \nThread safe primitive.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/Threading/Atom.cs.html)\nor\n[解説](https://zenn.dev/sator_imaging/articles/ed6dac717f5038)\n\n\n- `MiniXXHash`  \nMinimal xxHash32 / xxHash64 implementation.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/Hashing/MiniXXHash.cs.html)\nor\n[日本語版](https://qiita.com/sator_imaging/items/36c390c0536a6750b788)\n\n    \u003cdetails\u003e\u003csummary\u003eLicense: \u003cstrong\u003eBSD 2-Clause\u003c/strong\u003e\u003c/summary\u003e\n\n    xxHash Clean C Reference Implementation\n    ```\n    xxHash Library\n    Copyright (c) 2012-2020 Yann Collet\n    Copyright (c) 2019-2020 Devin Hussey (easyaspi314)\n    All rights reserved.\n\n    Redistribution and use in source and binary forms, with or without modification,\n    are permitted provided that the following conditions are met:\n\n    * Redistributions of source code must retain the above copyright notice, this\n      list of conditions and the following disclaimer.\n\n    * Redistributions in binary form must reproduce the above copyright notice, this\n      list of conditions and the following disclaimer in the documentation and/or\n      other materials provided with the distribution.\n\n    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\n    ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n    ```\n\n    \u003c/details\u003e\n\n\n- `SpanList\u003cT\u003e`  \nList implementation of `Span\u003cT\u003e` especially designed to work with `Span\u003cchar\u003e`.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/System/SpanList.cs.html)\n\n    - *TODO*: Add `(int, int) GetMinMaxLength()`\n        - To prevent enumerating repeatedly to get same result.\n        - Add `bool _isFrozen` to determine recalculate is required. `Write` turns it off when changed.\n        - Add `bool IsFormattable` with more strict token check: `{one}{two}` (currently accepted but must be rejected).\n        - One pass replacement for `FormatNonAlloc`: search for `{` then perform `.Slice(foundIndex, fromTokenMaxLength)`, check which one is match.\n\n\n- `RustSharp`  \nMove semantics for .NET / Unity.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/FancyStuff/RustSharp.cs.html)\nor\n[解説](https://zenn.dev/sator_imaging/articles/e6428d4f1c8158)\n\n\n- `UString`  \nLightning-fast non-alloc string builder faster than `DefaultInterpolatedStringHandler`.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/Text/UString.cs.html)\nor\n[技術的な解説](https://qiita.com/sator_imaging/items/edc5be1a55dd867e1c73)\n\n    *NOTE*: Depending on `StrictEnum`\n    *TODO*: Benchmark\n\n\n- `Poolable\u003cT\u003e`  \nSelf-contained singly linked list based object pool.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/System/Poolable.cs.html)\nor\n[日本語版](https://qiita.com/sator_imaging/items/2a387a54a01e91e5d71d)\n\n    *TODO*: Write tests\n\n\n- `Sentinel`  \nFast \u0026 efficient exclusive or concurrent thread/event manager.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/Threading/Sentinel.cs.html)\n\n\n- `WhenEachEnumerator`  \n`Task.WhenEach` for Unity / .NET Standard 2.1.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/Threading/WhenEachEnumerator.cs.html)\nor\n[日本語版](https://qiita.com/sator_imaging/items/0facece38f6e1c03bd19)\n\n\n- `Defer`  \nProviding function for `early-finally` pattern.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/System/Defer.cs.html)\n\n    - *TODO*: Implement `IAsyncDisposable` overloads.\n        - ex: `await using var _ = Defer.New(async () =\u003e await ...);`\n\n\n- `StrictEnum`  \nUnlike other enum utility, this class reuses system cache and also support parsing `Flags` value.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/System/StrictEnum.cs.html)\n\n    See also:\n    [FinalEnumGenerator](https://github.com/sator-imaging/FGenerator/tree/main/FinalEnumGenerator)\n\n\n- `ThreadSafeSingleton`  \nThread! safe!! singleton!!!\n[日本語版](https://qiita.com/sator_imaging/items/6c60e462417a5235778a)\n\n\n- NUnit-compatible Framework for Unity Editor  \nCrazy stuff.\nNo need to use this anymore as unity asset store now accepts `package.json`.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/FancyStuff/NUnit.Framework.UnityStubs.cs.html)\n\n\n\n\n\n\u0026nbsp;\n\n# 🎮 Unity Runtime APIs\n\n- **Observable `UnityEvent`**  \nTransform `UnityEvent` to `IObservable\u003cT\u003e`.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/Reactive/ObservableUnityEvent.cs.html)\n\n\n- **Nullable support for `UnityEngine.Object`**  \nReliable nullable (`??` `?.` ~~`??=`~~) support for `UnityEngine.Object`.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/UnityObject/NullableUnityObject.cs.html)\n\n\n- `ManagedShell`  \nProvides functions that avoid creating leaked managed shell.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/UnityObject/ManagedShell.cs.html)\nor\n[解説その１](https://qiita.com/sator_imaging/items/6bca6c642b6347bd68d8)\n[その２](https://qiita.com/sator_imaging/items/1251fa3a0b51db87a82f)\n\n\n- `PoolableBehaviour\u003cT\u003e`  \nSelf-contained singly linked list based `MonoBehaviour` pool.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/UnityObject/PoolableBehaviour.cs.html)\nor\n[日本語版](https://qiita.com/sator_imaging/items/80c712ee4fcabfce9163)\n\n\n- **UI Toolkit Core Extensions**\n    - `ExecuteAfter` extension method\n        - unlike builtin `ExecuteLater` method, this method runs action right after specified number of *repaint* events.\n    - `DisableStyleTransitionScope` extension method\n        - this method temporarily turns off all transitions and turns them back on when leaving the `IDisposable` scope. useful for immediate style update without transition animation.\n\n    - UI Toolkit Event Subscription  \n    Use extension method `RegisterCallbackAsSubscription` to register event as `IDisposable` interface.\n    It allows easily unregister event later.\n\n    - UI Toolkit Dropdown Helper  \n    Extension method `RegisterCallbackAsEnum` allows implement typed callback.\n    And also there is option to delay event to correctly handle dropdown event.\n    (if no delay, dropdown in Unity editor behaves like 'stop-the-world' and some actions are not work as expected)\n\n        *NOTE*: Depending on `StrictEnum`\n\n\n- `ReusableCoroutine`  \nNon-alloc Unity coroutine implementation.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/api/SatorImaging.UnityFundamentals.ReusableCoroutine.html)\nor\n[日本語版](https://zenn.dev/sator_imaging/articles/b0ab667808d563#【unity】再利用可能なコルーチン)\n\n\n\n\u0026nbsp;\n\n# 🖱️ Unity Editor Scripts\n\n- **UPM Package Test Kit**  \nGenerate clean environment and build script for selected UPM package.\n[📘](Editor/UpmPackage)\nor\n[日本語マニュアル](https://zenn.dev/sator_imaging/articles/feadbd5b1281d8)\n\n    *TODO*: Unit test automation.\n\n\n- **C# API Documentation for IDE**  \nDownload C# API Documentation from Nuget.org.\n[📘](Editor/Nuget)\n\n    License: \u003cstrong\u003eApache License version 2.0\u003c/strong\u003e\n\n\n- `UnityEditorMainToolbar`  \nProvide access to `VisualElement` in Unity main toolbar.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Editor/Uncategorized/UnityEditorMainToolbar.cs.html)\nor\n[日本語版](https://qiita.com/sator_imaging/items/f1bdf82016117cd6c7bd)\n\n\n- **Leaked Managed Shell Detector**  \nNot perfect.\nJust for reference.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Editor/Uncategorized/LeakedManagedShellDetector.cs.html)\n\n\n- **Assembly Definitions Manager** for Project Settings Panel  \n*TODO*: Documentation\n\n\n- *WIP*: `sealed`-able Type Finder  \nAs IL2CPP bloats resulting C++ code if C# class is not marked with `sealed` modifier.\n\n\n\n\n\n\u0026nbsp;\n\n# 🗑️ *Obsolete*\n\nFiles are found in [Obsolete/](./Obsolete/) folder with `.txt` extension.\n\n\n- **CancellationToken based Lifecycle Manager**  \nObsolete features still exist as `.txt` files.\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/Obsolete/LifecycleBehaviour/README.html)\nor\n[日本語版](https://qiita.com/sator_imaging/items/48296a686e4bbff8676c)\n\n\n- `Run`  \nJob runner for Unity providing reliable un-async-ing functions and more.\n\n    \u003e [!NOTE]\n    \u003e `InitializeMainThreadContext` may be required to being called on Unity startup. (it called automatically by default)\n\n    *TODO*: documentation for `OnMainThread`, `InThreadPool`, `SetExceptionHandler`, `GetTimerToken`, `GetElapsedTime`, `Shutdown`, `CreateNewScheduler`, `SetConcurrentThreadCount`\n\n\n- `ObservableAction\u003cT\u003e`\n[📘](https://sator-imaging.github.io/Unity-Fundamentals/HeaderDocs/Runtime/Reactive/ObservableAction.cs.html)\n\n\n\n\n\n\u0026nbsp;\n\n# 📝 Devnote\n\n## ⚙️ `DefineConstants`\n\nHow to set `DefineConstants` in *.csproj* file from `dotnet` command, see [Directory.Build.Props](../CStrBenchmark/Directory.Build.props) and [Program.cs](../CStrBenchmark/Program.cs#L37) for details.\n\nSource: https://github.com/dotnet/sdk/issues/9562#issuecomment-1386955134\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsator-imaging%2Funity-fundamentals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsator-imaging%2Funity-fundamentals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsator-imaging%2Funity-fundamentals/lists"}