コガネブログ

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

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

【Unity】ゲーム中にコンソールのようにコマンドを実行できる「UnityConsole」紹介

はじめに 「UnityConsole」を Unity プロジェクトに導入することで ゲーム中にコンソールのようにコマンドを実行できるようになります クイックスタート using UnityEngine; public class Example : MonoBehaviour { private void Awake() { // コンソールの…

【Unity】Addressable Asset System でビルドできるファイルかどうかを確認する方法

概要 using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var path = AssetDatabase.GetAssetPath( Selection.activeObject ); var mainAssetType = AssetDatabase.GetMainAsse…

【C#】XML のすべての要素を読み込むサンプル

C#

概要 using System; using System.Xml.Linq; class Program { static void Main() { var document = XDocument.Load( "【XML のファイルパス】" ); foreach ( var xElement in document.Descendants().Elements() ) { Console.WriteLine( xElement.Name ); }…

【Unity】C# スクリプトを開こうとすると Visual Studio の新しいインスタンスが起動してしまう場合

概要 Visual Studio で「ファイル変更の検出」ダイアログが表示されている時に Unity から C# スクリプトを開こうとすると Visual Studio の新しいインスタンスが起動してしまう現象に遭遇した Unity の Package Manager から Visual Studio Editor を削除し…

【雑記】DeNA TechCon 2021 の動画が見れる YouTube チャンネル

概要

【Unity】Script error: OnTriggerStay This message parameter has to be of type: [UNREGISTERED] The message will be ignored.

概要 Script error: OnTriggerStay This message parameter has to be of type: [UNREGISTERED] The message will be ignored. Unity で WebGL ビルドしたゲームを起動したら 上記のエラーが発生する現象に遭遇した Project Settings の「Player > Strip Eng…

【おすすめスライド】「ボトムアップドメイン駆動設計 後編」

スライド

【おすすめスライド】「ボトムアップドメイン駆動設計 前編」

スライド

【おすすめスライド】「オブジェクト指向のその前に-凝集度と結合度」

スライド

【おすすめスライド】「オブジェクト指向 パラメータ多相・実装継承 / OOP3」

スライド

【おすすめスライド】「オブジェクト指向 カプセル化・ポリモーフィズム / OOP2」

スライド

【おすすめスライド】「オブジェクト指向 導入 / OOP1」

スライド