コガネブログ

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

2022-01-10から1日間の記事一覧

【Unity】エディタ拡張で Project Template を保存する関数

ソースコード using System.Reflection; using UnityEditor; using UnityEngine.Assertions; public static class EditorUtilityInternal { public static void SaveProjectAsTemplate ( string targetPath, string name, string displayName, string descri…

【Unity】Building Library\Bee\artifacts\Android\Manifest\LauncherManifestDiag.txt failed with output:

概要 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…

【Unity】Hierarchy を右クリックして UI を作成できなくなった場合

概要 Hierarchy を右クリックした時に「UI」という項目が表示されておらず UI を作成できなくなった場合、 Unity メニューの「GameObject > UI」から UI を作成できる 参考サイト様

【Marp】Marp CLI で PDF に変換する時に HTML タグが反映されない場合

概要 ./bin/marp.exe ^ --pdf ^ 【.md のファイルパス】 ^ --html ^ --theme custom-theme.css ^ --allow-local-files --pdf で出力する場合にも --html を指定すると Marp CLI で PDF に変換する時に HTML タグが反映されるようになる 参考サイト様

【Marp】M PLUS 1p を使う方法

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 適用前 適用後 参考サイ…

【Marp】Noto Sans Japanese を使う方法

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 適用前 適用後 参…

【雑記】コマンドプロンプトからネットワーク接続の ON / OFF を切り替える方法

概要 netsh interface show interface まずコマンドプロンプトで上記のコマンドを実行します するとネットワーク接続の一覧が表示されるので コマンドプロンプトから接続を切り替えたいネットワークの 「Interface Name」を覚えておきます netsh interface s…

【雑記】Google アナリティクスで訪問者さんが使用しているモニターの解像度を調べる方法

概要 Google アナリティクスの左メニューで 「ユーザー > テクノロジー > ブラウザと OS」を選択した後に 「画面の解像度」を選択すると、訪問者さんが使用している モニターの解像度の割合を確認できる ブログのレイアウトを考える時の参考にできる

【Python】exe 化する方法

概要 pip install pyinstaller 事前に pip install で pyinstaller をインストールしておく pyinstaller 【Python のファイルパス】 --onefile 後は上記のコマンドで指定した Python スクリプトを exe 化できる 作成された exe は dist フォルダに出力される

【Python】urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>

概要 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>

【PowerShell】このシステムではスクリプトの実行が無効になっているため、ファイル XXXX.ps1 を読み込むことができません

概要 このシステムではスクリプトの実行が無効になっているため、 ファイル XXXX.ps1 を読み込むことができません。詳細については、 「about_Execution_Policies」(https://go.microsoft.com/fwlink/?LinkID=135170) を参照してください。 PowerShell のス…

【Docker】The WSL 2 Linux kernel is now installed using a separate MSI update package.

概要 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…

【Docker】Hardware assisted virtualization and data execution protection must be enabled in the BIOS.

概要 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 を起動しようとしたら上記…

【C#】指定した倍数で四捨五入のように丸める関数

C#

ソースコード 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…

Unity1Week お題「正」で総合3位をいただきました!

概要 Unity1週間ゲームジャム お題「正」で総合3位をいただきました 評価してくださった皆さんありがとうございます! これで直近3作品すべてで総合3位に入賞できました ゲームはこちら https://unityroom.com/games/hakotsukami