コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】Failed to resolve packages: Failed to add editor bundled package

概要 Failed to resolve packages: Failed to add editor bundled package [/Applications/Unity/Hub/Editor/XXXX/Unity.app/Contents/Resources/PackageManager/Editor/com.unity.xr.arsubsystems-2.1.2.tgz] to the package cache: ENOTEMPTY: directory n…

【Xcode】Code Signing Error: Provisioning profile "XXXX" doesn't include the currently selected device "YYYY" (identifier ZZZZ).

概要 Code Signing Error: Provisioning profile "XXXX" doesn't include the currently selected device "YYYY" (identifier ZZZZ). Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 14.2' Code Signing Error: …

【Unity】オブジェクトの参照が Missing Reference になっているかどうかを確認できるクラス「UniMissingReferenceUtils」を GitHub に公開しました

リポジトリ 使い方 using Kogane; using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var gameObject = Selection.activeGameObject; var hasMissingReference = MissingRefer…

【Unity】UnityEngine のいくつかの API の静的プロパティの情報を JSON 形式で取得できるクラス「UniJsonUnityEngine」を GitHub に公開しました

リポジトリ 使用例 using Kogane; using UnityEngine; public class Example : MonoBehaviour { private void Awake() { Debug.Log( JsonUnityEngineApplication.Get() ); Debug.Log( JsonUnityEngineDebug.Get() ); Debug.Log( JsonUnityEngineSceneManagem…

【おすすめスライド】「オブジェクト指向の「語る」と「示す」」

スライド

【おすすめスライド】「ゲーム開発者のための C++11~C++20, 将来の C++ の展望」

スライド

【Unity】Scene ビューでゲームオブジェクトを選択しても Hierarchy の階層が開かない場合

概要 Hierarchy ウィンドウがロックされてしまっている可能性がある ロックされている場合はアイコンをクリックしてロックを外す

【Unity】サウンドのマスターボリュームを変更する方法

概要 Project Settings の「Audio > Global Volume」から変更できる AudioListener.volume = 0.5f; スクリプトからは AudioListener.volume で変更できる

【Unity】作成した keystore の SHA1 を確認する方法

概要 keytool -list -keystore "【.keystore のファイルパス】" -v keytool.exe は例えば以下の場所に存在する C:\Program Files (x86)\Java\jre1.8.0_281\bin\keytool.exe

【Unity】Addressable Asset System の AddressableAssetGroup に登録されているエントリが重複していないか確認するテストコード

概要 using System.Collections.Generic; using System.Linq; using System.Reflection; using NUnit.Framework; using UnityEditor; using UnityEditor.AddressableAssets; using UnityEditor.AddressableAssets.Settings; public sealed class Addressable…

【Unity】Addressable Asset System の AddressableAssetSettings に登録されているグループが重複していないか確認するテストコード

概要 using System.Linq; using NUnit.Framework; using UnityEditor.AddressableAssets; using UnityEditor.AddressableAssets.Settings; public sealed class Addressables用テスト { private sealed class DuplicateGroupResult { private readonly strin…

【Unity】エディタ拡張でビルドに失敗した時にも呼び出されるコールバックを実装する方法

概要 using UnityEditor; using UnityEditor.Build; using UnityEditor.Build.Reporting; using UnityEngine; public class Test : IPreprocessBuildWithReport { public int callbackOrder => 0; public void OnPreprocessBuild( BuildReport report ) { vo…

【Unity】Windows における WebGL で PlayerPrefs で保存したデータの保存場所(IndexedDB)

概要 Google Chrome C:\Users\【ユーザ名】\AppData\Local\Google\Chrome\User Data\Default\IndexedDB\【URL】 Mozilla Firefox C:\Users\【ユーザ名】\AppData\Roaming\Mozilla\Firefox\Profiles\【プロファイル名】\storage\default\【URL】 Microsoft Ed…

【Unity】iOS の WebView で自己署名証明書を使用しているサーバの Web ページを表示したい場合

概要 Unity でビルドした iOS アプリで「unity-webview」を使用して 自己署名証明書を使用しているサーバの Web ページを表示したい場合、 上記のサイト様で記載されている以下のコードを 「WebView.mm」に記述することで Web ページを表示できるようになる …

【Unity】Looks like you are rendering without using requestAnimationFrame for the main loop.

概要 Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates! W…