新規Unityゲームを立ち上げるときに使用するテンプレート。
Unityゲーム開発でよく使われるライブラリ、ミドルウェア、設定などをこちらのリポジトリで管理することで、
新規プロジェクト作成時の手間を省くことができます。
- Project Settings
- Package Manager
- OpenUPM
- Scope(s)
- com.google
- com.github-glitchenzo
- Scope(s)
- OpenUPM
- Player
- Scripting Backend: IL2CPP
- API Compatibility Level: .NET Framework
- Package Manager
- TMP Essential Resources インポート済み
- Unity Companion License (Unity製ライブラリ)
- Addressables (com.unity.addressables)
- Scriptable Build Pipeline (com.unity.scriptablebuildpipeline)
- Burst (com.unity.burst)
- Post Processing (com.unity.postprocessing)
※他にもプロジェクト作成時にデフォルト追加されたパッケージ、あるいは依存として追加されたパッケージもあります。詳細はPackage Managerにて確認ください
- MIT licence
- GlitchEnzo/NuGetForUnity
- Install via OpenUPM
- Cysharp/UniTask
- Install via Git
- Cysharp/R3
- Install via Git & NuGetForUnity
- Cysharp/MasterMemory
- Install via NuGetForUnity
- Cysharp/ZString
- Install via Git & NuGetForUnity(
System.Runtime.CompilerServices.Unsafe/6.0.0に依存)
- Install via Git & NuGetForUnity(
- Cysharp/ZLinq
- Install via Git & NuGetForUnity
- ZStringと同じく
System.Runtime.CompilerServices.Unsafeに依存しますが、依存するバージョンは6.1.2ですので、6.1.2にアプデ
- Yarn Spinner
- Install via Git
- annulusgames/LitMotion
- Install via Git
- focus-creative-games/hybridclr
- Install via Git
- GlitchEnzo/NuGetForUnity
私の独断で不要と思ったため、以下のパッケージを削除しました。
- Version Control (com.unity.collab-proxy)
- Visual Scripting (com.unity.visualscripting)
- PlayerでCompany NameとProduct Nameを設定する
- SRP(Scriptable Render Pipeline)は未使用ですので、必要なら手動で設定してください
- HybridCLRを利用する場合、ドキュメントを参考して初期設定などを行ってください
MasterMemoryのドキュメントによりますと、Unityではデフォルトinitキーワード使えないので、もし必要なら手動で設定してください。
MasterMemoryで生成されるコードの名前空間を指定することも可能です。
参考URL: https://github.com/Cysharp/MasterMemory?tab=readme-ov-file#getting-startedunity
// Optional: Unity can't load default namespace to Source Generator
// If not specified, 'MasterMemory' will be used by default,
// but you can use this attribute if you want to specify a different namespace.
[assembly: MasterMemoryGeneratorOptions(Namespace = "MyProj")]
// Optional: If you want to use init keyword, copy-and-paste this.
namespace System.Runtime.CompilerServices
{
internal sealed class IsExternalInit { }
}The biggest difference is that in normal Rx, when an exception occurs in the pipeline, it flows to
OnErrorand the subscription is unsubscribed, but in R3, it flows toOnErrorResumeand the subscription is not unsubscribed. I consider the automatic unsubscription by OnError to be a bad design for event handling. It's very difficult and risky to resolve it within an operator like Retry, and it also led to poor performance (there are many questions and complex answers about stopping and resubscribing all over the world). Also, converting OnErrorResume to OnError(OnCompleted(Result.Failure)) is easy and does not degrade performance, but the reverse is impossible. Therefore, the design was changed to not stop by default and give users the choice to stop.
R3では、Observer側のパイプラインで例外発生したときに、パイプラインは止まらず、処理を継続します。Subscriptionも自動的に解除されません。
Subscribe時にOnCompleteで例外をハンドルするか、あるいはObservableSystem.RegisterUnhandledExceptionHandlerを実装してください。