コガネブログ

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

【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…

【Unity】CommandInvokationFailure: Unity Remote requirements check failed

概要 CommandInvokationFailure: Unity Remote requirements check failed C:/Program Files/Unity/Hub/Editor/2019.4.17f1/Editor/Data/PlaybackEngines/AndroidPlayer\SDK\platform-tools\adb.exe forward tcp:7201 tcp:7201 stderr[ error: no devices/em…

【ReSharper】編集したファイルの保存時に自動で Code Cleanup する方法

概要 Visual Studio メニューの「拡張機能 > ReSharper > Options...」を選択して 左メニューの「Code Editing > Code Cleanup > General」を選択して 「Automatically run cleanup when saving a file~」をオンにすることで ファイル保存時に自動で Code Cl…

【VSCode】Marp の default theme でセクションヘッダーは中央揃え、タイトルと本文は左上基準にする方法

通常 --- marp: true --- # タイトル --- # タイトル 本文1 本文2 本文3 セクションヘッダーは中央揃えタイトルと本文は左上基準 --- marp: true style: | section { justify-content: normal; } section.lead { justify-content: center; text-align: cent…