2022-01-01から1ヶ月間の記事一覧
検証内容 テクスチャと 3D モデルが合計約 4,000 個存在する Unity プロジェクトで検証 Library フォルダを削除した状態でプロジェクトを開くのにかかる時間を計測 並列インポートが有効な場合と無効な場合でかかった時間を比較 並列インポート有効時の設定…
概要 複数ファイル内検索で「ファイルマスク」をチェックして *.meta と入力し、 さらに「Include non-solution items」をチェックした状態で検索すると Unity の .meta ファイル内も検索することができます
概要 Addressables を導入しているプロジェクトからゲームをビルドして Profiler を見た時に 「DiagnosticEventCollectorSingleton.Update()」というプロセスで 1.2 KB の GC Alloc が定期的に発生している場合 AddressableAssetSettings の「Send Profiler …
概要 Addressables 1.18.16 あたりから AssetReference のコンストラクタで /// <summary> /// Construct a new AssetReference object. /// </summary> public AssetReference() { #if UNITY_EDITOR EditorApplication.playModeStateChanged -= ReleaseHandleWhenPlaymodeState…
概要 Chrome を開いてアドレスバーに chrome://tracing と入力します Load ボタンを押して Unity プロジェクトのフォルダに存在する Library/com.unity.addressables/AddressablesBuildTEP.json を選択します これで Addressables のビルド時間の内訳を Chro…
概要 Unity の Preferences を開いて左メニューで「Addressables」を選択して 「Debug Build Layout」をオンにした状態で Addressables でビルドすると ビルド結果の詳細が Library/com.unity.addressables/ フォルダに buildlayout.txt というファイルで出…
概要 上記の公式の Addressables のサンプルリポジトリの 「Advanced > Play Asset Delivery」フォルダに Addressables で Android の Play Asset Delivery に対応する サンプルプロジェクトが格納されています
概要 Addressables のグループの Inspector で 「Use UnityWebRequest for Local Asset Bundles」をオンにすると Android でローカルアセットバンドルの読み込みが速くなる場合があります 参考サイト様
概要 Addressables のグループの Inspector で「Asset Bundle CRC」を「Disabled」にすると アセットバンドルの読み込みが速くなる場合があります 参考サイト様
ソースコード using System.Linq; using UnityEngine; using UnityEngine.AddressableAssets; public sealed class Example : MonoBehaviour { public AssetReference m_assetReference; private void Start() { var handle = Addressables.LoadResourceLoca…
概要 Unity メニューの「Window > Analysis > Import Activity」を選択するか Project ウィンドウでアセットを右クリックして 「View in Import Activity Window」を選択するか Inspector のタブを右クリックして「Open in Import Activity Window」を選択す…
概要 アセットの Inspector の「Asset PostProcessors」の欄を開くと そのアセットのインポート時に使用された AssetPostprocessor を一覧で確認できます
検証環境 Unity 2021.2.7f1 Addressables 1.19.15 概要 AddressableAssetSettings の Inspector の 「Build > Build Addressables on Player Build」を変更することで ゲームをビルドする時に自動で Addressables のビルドを実行できるようになります 項目 …
概要 Unity メニューの「Edit > Project Settings」を開いて 左メニューで「Editor」を選択して「Parallel Import」をオンにすると アセットの並列インポートを有効化できます 記事執筆時点で並列インポートに対応しているアセットは以下のとおりです Textur…
ソースコード using System.Linq; using UnityEditor; using UnityEditor.AddressableAssets; using UnityEditor.AddressableAssets.Settings.GroupSchemas; using UnityEngine; public static class Example { [MenuItem( "Tools/Hoge" )] public static vo…
はじめに 100 個のテクスチャが格納されている Unity プロジェクトで [MenuItem( "Tools/Reimport" )] public static void Reimport() { var sw = Stopwatch.StartNew(); AssetDatabase.ImportAsset ( "Assets/Textures", ImportAssetOptions.ForceUpdate | …
ソースコード using System.Reflection; using UnityEditor; using UnityEngine.Assertions; public static class EditorUtilityInternal { public static void SaveProjectAsTemplate ( string targetPath, string name, string displayName, string descri…
概要 Building Library\Bee\artifacts\Android\Manifest\LauncherManifestDiag.txt failed with output: System.Xml.XmlException: Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 29, position 5. at System.Xml.XmlTextReaderIm…
概要 Hierarchy を右クリックした時に「UI」という項目が表示されておらず UI を作成できなくなった場合、 Unity メニューの「GameObject > UI」から UI を作成できる 参考サイト様
概要 ./bin/marp.exe ^ --pdf ^ 【.md のファイルパス】 ^ --html ^ --theme custom-theme.css ^ --allow-local-files --pdf で出力する場合にも --html を指定すると Marp CLI で PDF に変換する時に HTML タグが反映されるようになる 参考サイト様
Markdown --- marp: true theme: uncover --- <style> @import url('https://fonts.googleapis.com/css?family=M+PLUS+1p'); section { font-family: 'M PLUS 1p'; } </style> # タイトル --- ## スライド 1 * 箇条書き 1 * 箇条書き 2 * 箇条書き 3 適用前 適用後 参考サイ…
Markdown --- marp: true theme: uncover --- <style> @import url('https://fonts.googleapis.com/css?family=Noto+Sans+JP'); section { font-family: 'Noto Sans JP'; } </style> # タイトル --- ## スライド 1 * 箇条書き 1 * 箇条書き 2 * 箇条書き 3 適用前 適用後 参…
概要 netsh interface show interface まずコマンドプロンプトで上記のコマンドを実行します するとネットワーク接続の一覧が表示されるので コマンドプロンプトから接続を切り替えたいネットワークの 「Interface Name」を覚えておきます netsh interface s…
概要 Google アナリティクスの左メニューで 「ユーザー > テクノロジー > ブラウザと OS」を選択した後に 「画面の解像度」を選択すると、訪問者さんが使用している モニターの解像度の割合を確認できる ブログのレイアウトを考える時の参考にできる
概要 pip install pyinstaller 事前に pip install で pyinstaller をインストールしておく pyinstaller 【Python のファイルパス】 --onefile 後は上記のコマンドで指定した Python スクリプトを exe 化できる 作成された exe は dist フォルダに出力される
概要 urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)> Mac で Python を実行したら上記のエラーが発生した /Applications/Python 3.XX/Install Certificates.command 上記のファイルをダブルクリックして実行したらエラーが発生しなくなった 参考サイト様</urlopen>
概要 このシステムではスクリプトの実行が無効になっているため、 ファイル XXXX.ps1 を読み込むことができません。詳細については、 「about_Execution_Policies」(https://go.microsoft.com/fwlink/?LinkID=135170) を参照してください。 PowerShell のス…
概要 WSL 2 installation is incomplete. The WSL 2 Linux kernel is now installed using a separate MSI update package. Please click the link and follow the instructions to install the kernel update: https://aka.ms/wsl2kernel. Press Restart af…
概要 An unexpected error occurred Hardware assisted virtualization and data execution protection must be enabled in the BIOS. See https://docs.docker.com/desktop/windows/troubleshoot/#virtualization Docker Desktop を起動しようとしたら上記…
ソースコード public static class MathUtils { public static double RoundByMultiple( double value, double unit ) { return Math.Round( value / unit ) * unit; } } 使用例 Console.WriteLine( MathUtils.RoundByMultiple( 0.26, 0.25 ) ); // 0.25 Con…