コガネブログ

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

【Unity】無料で Hierarchy を拡張できる「Hierarchy 2」紹介

はじめに 「Hierarchy 2」を Unity プロジェクトに導入することで 無料で Hierarchy を拡張できます 使用例 Hierarchy にタグやレイヤー、コンポーネントの情報が表示されます タグやレイヤー、コンポーネントを右クリックすると編集できます Project Settin…

【Unity】Visual Studio Editor Package version 2.0.11 is available, we strongly encourage you to update from the Unity Package Manager for a better Visual Studio integration

概要 Visual Studio Editor Package version 2.0.11 is available, we strongly encourage you to update from the Unity Package Manager for a better Visual Studio integration Unity エディタに上記の警告が表示されるようになったら Unity メニューの…

【Unity】ArgumentException: You can only call GUI functions from inside OnGUI.

概要 using System.Threading.Tasks; using UnityEditor; using UnityEngine; public sealed class Example : EditorWindow { [MenuItem( "Tools/Hoge" )] private static void Open() { GetWindow<Example>(); } private async void OnGUI() { if ( GUILayout.Button</example>…

【Unity】Addressables でローカルカタログを圧縮する場合にビルドログがアプリに含まれないようにする方法

検証環境 Addressables 1.16.19 概要 Addressables でローカルカタログを圧縮する設定を有効化して アセットバンドルをビルドするようにしたところ、 「buildlogtep.json」というビルドログのファイルが アプリビルド時にアプリに含まれるようになってしまっ…

【Unity】Addressables でローカルカタログを読み込む時にメインスレッドが止まらないようにする方法

検証環境 Addressables 1.16.19 概要 Addressables で管理しているグループが多いと、 ローカルカタログを読み込む処理に時間がかかるようになり、 メインスレッドが止まってしまう 重たい処理は TextDataProvider.Start 関数で File.ReadAllText を使用して…

【Unity】MessagePack for C# で LZ4 の圧縮・展開を行う方法

概要 using MessagePack; using UnityEngine; public class Example : MonoBehaviour { private void Awake() { var str = "ピカチュウ"; var lz4Options = MessagePackSerializerOptions.Standard.WithCompression( MessagePackCompression.Lz4BlockArray )…

【Unity】Unity 2021.1 新機能 - コンパイル開始時に Console のログをクリアできるオプションが追加された

概要 Unity 2021.1 から、Console の「Clear > Clear on Recompile」をオンにすると コンパイル開始時に Console のログをクリアできるようになった

【Unity】Unity 2021.1 新機能 - エディタのウィンドウのタブをダブルクリックすると最大化できる

概要 Unity 2021.1 から、エディタのウィンドウのタブをダブルクリックすると 最大化・最小化を切り替えられるようになった

【Unity】iOS において指定したパスを iCloud のバックアップの対象外にする方法

概要 using System.Diagnostics; using UnityEngine; public class Example : MonoBehaviour { private void Awake() { SetNoBackupFlag( Application.persistentDataPath ); } [Conditional( "UNITY_IOS" )] private static void SetNoBackupFlag( string p…

【Unity】Inspector に表示するコンポーネントを選択できるようになる「Smart Inspector」紹介

はじめに 「Smart Inspector」を Unity プロジェクトに導入することで Inspector に表示するコンポーネントを選択できるようになります 使用例 このように Inspector に表示するコンポーネントを選択できます また、UnityEvent の表示がデフォルトで閉じた状…

【Unity】Curl error 7: Send failure: Software caused connection abort

概要 Curl error 7: Send failure: Software caused connection abort (Filename: ./Modules/UnityWebRequest/Implementations/TransportCurl.cpp Line: 813) Android でインターネットに接続できていない時に UnityWebRequest を実行したら上記のエラーが発…

【Mac】シェルスクリプトでファイルサーバをマウントする方法

概要 open 'smb://【ファイルサーバの名前】/【フォルダ名】'

【Jenkins】io.jenkins.plugins.appcenter.AppCenterException: Upload app to resource unsuccessful: HTTP 500 Internal Server Error:

概要 io.jenkins.plugins.appcenter.AppCenterException: Upload app to resource unsuccessful: HTTP 500 Internal Server Error: {"error":{"code":500,"message":"Unable to load one or more of the requested types. Retrieve the LoaderExceptions pro…

【Bitmap font generator】X characters from the file are not available in the font

概要 Bitmap font generator メニューの「Edit > Select chars from file」で テキストファイルから文字を読み込んだ時に X characters from the file are not available in the font 上記の警告が表示されて文字が反映されなかった場合は テキストファイル…

【Jenkins】currentBuild.description で改行する方法

概要 stage( "【ステージ名】" ){ steps { script{ currentBuild.description = "aaa<br>bbb<br>ccc" } } } <br> を使用する 参考サイト様