コガネブログ

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

2021-10-31から1日間の記事一覧

【VSCode】Markdown ではファイル保存時に末尾の空白をトリミングする機能を無効化する

概要 "[markdown]": { "files.trimTrailingWhitespace": false } settings.json に上記のコードを追加する

【VSCode】ブレークポイントを設定できなくなった場合

概要 設定の「Debug: Allow Breakpoints Everywhere」をオンにしたら ブレークポイントを設定できるようになった

【VSCode】拡張機能の自動更新を停止する方法

概要 拡張機能のメニューから「自動更新拡張機能 > なし」をオンにするか 設定の「Extensions: Auto Update」を「なし」にすると 拡張機能の自動更新を停止できます

【Unity】warning CS4014: Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.

概要 public async UniTaskVoid Fade() { await UniTask.Delay( 1 ); transform.DOMoveX( 5, 1 ); } 上記のように非同期メソッドで DOTween の関数を呼び出した時に warning CS4014: Because this call is not awaited, execution of the current method con…

【VSCode】デフォルトの言語モードを Markdown にする方法

概要 設定の「Default Language」に「markdown」を入力するか "files.defaultLanguage": "markdown" settings.json に上記のコードを追加する

【VSCode】Rech Batch をアンインストールしたら Batch のシンタックスハイライトが効かなくなった場合

概要 The built-in extension 'Window Bat Language Basics' is enabled along with Rech Batch, which may lead to misbehaviour while inserting 'rem' comments in lowercase. Would you like to manually disable the built-in extension 'Window Bat La…

【Rider】switch 式を縦に揃えたい場合

概要 「エディター > コードスタイル > C#」で「Switch expressions」をオンにすると switch 式を縦に揃えられるようになる

【Unity】C# 8.0 language feature

概要 switch 式などの C# 8.0 の機能を使おうとした時に 「C# 8.0 language feature」というエラーが表示される場合は Visual Studio 2017 を使用している可能性があります その場合は Visual Studio 2019 を使うとエラーが表示されなくなります

【VSCode】Marp で HTML 形式で出力したスライドで文字送りを無効化する方法

概要 data-marpit-fragment="[0-9]{1,}" 出力した HTML から上記の文字列を正規表現で削除する

【VSCode】言語モード「Markdown」のファイルで「テキスト校正くん」が動作しない場合

概要 .md ファイルとして保存すれば動作するようになる

【Unity】Visual Stdio でスクリプトを BOM 付き UTF-8 で保存する方法

概要 [*.cs] charset=utf-8-bom Unity プロジェクトのルートフォルダに「.editorconfig」というファイルを作成して 上記のコードを記述して保存する 次回からスクリプトを保存した時に BOM 付き UTF-8 で保存されます

【Unity】Multiple targets with name 'Unity Editor' running.

概要 Multiple targets with name 'Unity Editor' running. Unable to connenct. Use "Unity Attach Debugger" from the command palette (View > Command Palette...) to specify which process to attach to. VSCode で Unity のデバッグを開始しようとし…