検証環境 Unity 2022.1.23f1 Android 13 前提条件 Firebase Console にプロジェクトを作成済みで 「google-services.json」を Assets フォルダに導入済みだと想定しています Android に Switch Platform Android に Switch Platform しておきます パッケージ…
リポジトリ 使用例 Before using System; using System.Collections.Generic; using Cysharp.Threading.Tasks; using UnityEngine; public class Example : MonoBehaviour { private async UniTaskVoid Start() { var list = new List<UniTask>(); for ( var i = 0; i </unitask>…
概要 上記のページを開いて「Download package」を押して ダウンロードした .nupkg を ZIP で展開して、展開したフォルダ内の 「analyzers\dotnet\cs\IDisposableAnalyzers.dll」を Unity プロジェクトに追加して すべてのチェックを外して「Apply」を押して…
概要 Project Settings の「Audio > DSP Buffer Size」を 「Best latency」から「Best performance」にしたら音割れしなくなった
リポジトリ 使用例 using Cysharp.Threading.Tasks; using Kogane; using UnityEngine; public sealed class Example : MonoBehaviour { private async UniTaskVoid Star() { UniTask Impl1() => UniTask.CompletedTask; UniTask<bool> Impl2() => UniTask.FromRes</bool>…
【Unity】java.lang.IllegalArgumentException: Unknown permission: android.permission.POST_NOTIFICATIONS
概要 var tcs = new UniTaskCompletionSource<string>(); var callbacks = new PermissionCallbacks(); callbacks.PermissionGranted += _ => tcs.TrySetResult( "PermissionGranted" ); callbacks.PermissionDenied += _ => tcs.TrySetResult( "PermissionDenied" )</string>…
概要 using System; using UnityEngine; using UnityEngine.Networking; public class Example : MonoBehaviour { [Serializable] private sealed class Data { public int id = 25; public string name = "ピカチュウ"; } private void Awake() { var url =…
概要 InvalidOperationException: Don't call Firebase functions before CheckDependencies has finished Firebase を使用しているプロジェクトで上記の例外が発生する現象に遭遇した using Firebase; using Firebase.Analytics; using UnityEngine; public…
はじめに 「RectMask2DCulling」を Unity プロジェクトに導入することで 高速化された RectMask2D を使用できるようになります 使い方 「RectMask2D」の代わりに「RectMask2DCulling」を使用します
リポジトリ 使用例 ProjectSettings フォルダに 「GvhProjectSettings.xml.source」というファイルを格納することで コンパイル開始時や Unity エディタがフォーカスされた時に 「GvhProjectSettings.xml.source」を「GvhProjectSettings.xml」に上書きコピ…
リポジトリ 使用例 using Cysharp.Threading.Tasks; using Kogane; using UnityEngine; public sealed class Example : MonoBehaviour { private readonly InternetCheckerInstance m_instance = new ( "8.8.8.8", // Google Public DNS "8.8.4.4", // Googl…
リポジトリ 使用例 using Cysharp.Threading.Tasks; using Kogane; public static class InternetChecker { private static readonly string[] ADDRESSES = { "8.8.8.8", // Google Public DNS "8.8.4.4", // Google Public DNS "4.2.2.2", // Level 3 Commu…
概要 「Development Build」と「Script Debugging」をオンにしてビルドする オフの場合 オンの場合 参考サイト様
概要 Unity 2022 から Package Manager でパッケージを複数選択して 一括で「Remove」や「Update」ができる 操作 内容 Ctrl + クリック 複数選択 Ctrl + A すべて選択 Shift + クリック 範囲選択 Shift + Up / Down 追加選択
検証環境 Unity 2022.1.23f1 Mono2x + Development Build ビルドの場合 Library\Bee\Android\Prj\Mono2x\Gradle\launcher\build\intermediates\instant_app_manifest\debug\AndroidManifest.xml IL2CPP + Development Build ビルドの場合 Library\Bee\Androi…
概要 Error building Player: A domain reload is pending. Unity エディタで Switch Platform した直後に iOS ビルドしようとしたら 上記のエラーが発生する現象に遭遇した 一度 Unity を再生してから iOS ビルドしたら正常にビルドできた
リポジトリ 使用例 Project Settings で「Is Enable」をオンにすると シーンの Dirty フラグが立った原因が Console ウィンドウに出力されるようになります
概要 public static float InverseLerp( float a, float b, float value ) { return ( value - a ) / ( b - a ); }
リポジトリ 準備 本パッケージを使用するためには Python のインストールと 以下の Python パッケージのインストールが必要です pip install librosa pip install soundfile 使用例 using Kogane; using UnityEditor; public static class Example { [MenuIt…
これまで using UnityEngine; public sealed class Example : MonoBehaviour { private void OnDrawGizmos() { Gizmos.DrawLine( new( 0, 0 ), new( 1, 0 ) ); Gizmos.DrawLine( new( 1, 0 ), new( 1, 1 ) ); Gizmos.DrawLine( new( 1, 1 ), new( 0, 1 ) ); …
概要 using System.Linq; using UnityEngine; public sealed class Example : MonoBehaviour { [SerializeField] private Sprite m_sprite; [SerializeField] private SpriteData m_spriteData; // ScriptableObject private void Start() { // スプライトに…
概要 BuildOptions.CleanBuildCache を使用した場合、 このフォルダ内のキャッシュが削除されてからビルドされる?
概要 using UnityEditor; public static class Example { [MenuItem( "Tools/Hoge" )] public static void Hoge() { EditorUserBuildSettings.androidCreateSymbols = AndroidCreateSymbols.Debugging; } }
概要 Debug.Log( FirebaseApp.DefaultInstance.Options.AppId ); FirebaseApp クラスが持つ Options.AppId を使用する
概要 Graphics device is null. TMPro.TextMeshProUGUI:Awake() Play Asset Delivery を使用している Unity プロジェクトで Android ビルドしたらアプリ実行時に上記のエラーが発生する現象に遭遇した もう一度ビルドし直したら発生しなくなった Play Asset …
概要 FirebaseCrashlytics libcrashlytics could not be loaded. This APK may not have been compiled for this device's architecture. NDK crashes will not be reported to Crashlytics: FirebaseCrashlytics dlopen failed : library "libcrashlytics.s…
はじめに 「Fast Script Reload」を Unity プロジェクトに導入することで Unity 再生中にスクリプトの変更を反映できる(ホットリロードできる)ようになります 使い方 導入時に上記のダイアログが表示されたら「OK」を押して Auto Refresh を無効にします …
概要 FirebaseAnalytics.LogEvent( "error", parameters ); 上記のようにイベント名に error を使用した場合、 いつまでたっても Analytics のダッシュボードに反映されない現象に遭遇した Debug View を使用してもイベントが送信できていなかった FirebaseA…
概要 Backend produced unparsable log entry g/XXXX.dll.mvfrm","enqueueingNodeIndex":20} Play Asset Delivery を使用して Android ビルドしたら 2 回目以降のビルド時に上記のエラーが発生して Unity の再生やビルドに失敗する現象に遭遇した Unity を再…
概要 Exception failed: System.Threading.ThreadAbortException: Thread was being aborted. at (wrapper managed-to-native) System.Threading.WaitHandle.Wait_internal(intptr*,int,bool,int) at System.Threading.WaitHandle.WaitOneNative (System.Run…