コガネブログ

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

2023-01-01から1ヶ月間の記事一覧

【Unity】Graphics device is null.

概要 Graphics device is null. TMPro.TextMeshProUGUI:Awake() Play Asset Delivery を使用している Unity プロジェクトで Android ビルドしたらアプリ実行時に上記のエラーが発生する現象に遭遇した もう一度ビルドし直したら発生しなくなった Play Asset …

【Unity】FirebaseCrashlytics libcrashlytics could not be loaded.

概要 FirebaseCrashlytics libcrashlytics could not be loaded. This APK may not have been compiled for this device's architecture. NDK crashes will not be reported to Crashlytics: FirebaseCrashlytics dlopen failed : library "libcrashlytics.s…

【Unity】Unity 再生中にスクリプトの変更を反映できる「Fast Script Reload」紹介

はじめに 「Fast Script Reload」を Unity プロジェクトに導入することで Unity 再生中にスクリプトの変更を反映できる(ホットリロードできる)ようになります 使い方 導入時に上記のダイアログが表示されたら「OK」を押して Auto Refresh を無効にします …

【Unity】Firebase Analytics のイベント名に `error` は使用できない

概要 FirebaseAnalytics.LogEvent( "error", parameters ); 上記のようにイベント名に error を使用した場合、 いつまでたっても Analytics のダッシュボードに反映されない現象に遭遇した Debug View を使用してもイベントが送信できていなかった FirebaseA…

【Unity】Backend produced unparsable log entry

概要 Backend produced unparsable log entry g/XXXX.dll.mvfrm","enqueueingNodeIndex":20} Play Asset Delivery を使用して Android ビルドしたら 2 回目以降のビルド時に上記のエラーが発生して Unity の再生やビルドに失敗する現象に遭遇した Unity を再…

【Unity】Exception failed: System.Threading.ThreadAbortException: Thread was being aborted.

概要 Exception failed: System.Threading.ThreadAbortException: Thread was being aborted. at (wrapper managed-to-native) System.Threading.WaitHandle.Wait_internal(intptr*,int,bool,int) at System.Threading.WaitHandle.WaitOneNative (System.Run…

【Unity】Internal build system error. Backend exited with code 2.

概要 Internal build system error. Backend exited with code 2. tundra: error: Unexpected stdin Error building Player because scripts had compiler errors Build error: Build failed with 3 error(s) UnityEngine.Debug:LogErrorFormat (string,obje…

【Unity】インポートしたアセットに警告やエラーを設定する方法

概要 using UnityEditor; public class Example : AssetPostprocessor { private void OnPreprocessTexture() { if ( !assetPath.StartsWith( "Assets/" ) ) return; // 警告を設定 context.LogImportWarning( "ピカチュウ", context.mainObject ); // エラ…

【Jenkins】言語を変更できる「Locale」紹介

はじめに 「Locale」を Jenkins に追加することで 言語を変更できるようになります 使用例 「Jenkinsの管理 > システムの設定 > Local」を上記のように設定すると 言語を英語に変更できます

【Jenkins】ERROR: You must authenticate to access this Jenkins.

概要 ERROR: You must authenticate to access this Jenkins. Jenkins CLI 実行時に上記のエラーが発生する現象に遭遇した 「Jenkinsの管理 > グローバルセキュリティの設定」で 「Allow anonymous read access」をオンにして保存したら エラーが発生しなく…

【Unity】Debug.developerConsoleVisible

概要 using System; using UnityEngine; public class Example : MonoBehaviour { private void Start() { Debug.LogError( "ピカチュウ" ); throw new Exception( "ピカチュウ" ); } private void Update() { if ( Input.GetKeyDown( KeyCode.Z ) ) { Debug…

【Jenkins】フッターの「REST API」「Jenkins X.X.X」を消す方法

概要 上記の theme.css を JENKINS_HOME フォルダの「userContent」に格納して 「Jenkinsの管理 > システムの設定 > Theme」に URL を追加します

【Jenkins】左上の Jenkins アイコンを消す方法

概要 上記の theme.css を JENKINS_HOME フォルダの「userContent」に格納して 「Jenkinsの管理 > システムの設定 > Theme」に URL を追加することで 左上の Jenkins アイコンが 非表示になります

【Jenkins】右下の「凡例」や「Atom feed 全ビルド」を消す方法

概要 上記の theme.css を JENKINS_HOME フォルダの「userContent」に格納して 「Jenkinsの管理 > システムの設定 > Theme」に URL を追加することで 右下の「凡例」や「Atom feed 全ビルド」が非表示になります

【Jenkins】左メニューの「プロジェクト相関関係」や「ファイル指紋チェック」を消す方法

概要 上記の theme.js を JENKINS_HOME フォルダの「userContent」に格納して 「Jenkinsの管理 > システムの設定 > Theme」に URL を追加することで 開発者 プロジェクト相関関係 ファイル指紋チェック マイビュー が 非表示になります

【Jenkins】Invalid parameter type "gitParameter"

概要 pipeline { agent any parameters { gitParameter( branchFilter: 'origin/(.*)', defaultValue: 'main', name: 'BRANCH', type: 'PT_BRANCH' ) } stages { stage('Git') { steps { script { git( branch: params.BRANCH, url: '【リポジトリの URL】' …

【Jenkins】script not yet approved for use

概要 org.jenkinsci.plugins.scriptsecurity.scripts.UnapprovedUsageException: script not yet approved for use ジョブのビルド時に上記のエラーが発生する現象に遭遇した Jenkins を再起動したら出なくなった

【Jenkins】パラメータ付きビルドでブランチの一覧を表示できる「Git Parameter」紹介

はじめに 「Git Parameter」を Jenkins に追加することで パラメータ付きビルドでブランチの一覧を表示できるようになります 使用例 pipeline { agent any parameters { gitParameter( branchFilter: 'origin/(.*)', defaultValue: 'main', name: 'BRANCH', …

【Jenkins】マウスオーバーでビューの行の色を変える方法

概要 上記の theme.css を JENKINS_HOME フォルダの「userContent」に格納して 「Jenkinsの管理 > システムの設定 > Theme」に URL を追加することで マウスオーバーでビューの行の色を変更できます

【Jenkins】ビューのカラムに最後に失敗したジョブのコンソールへのリンクを追加できる「Console Column」紹介

はじめに 「Console Column」を Jenkins に追加することで ビューのカラムに最後に失敗したジョブのコンソールへのリンクを追加できるようになります 使い方 ビューの変更で「最新の失敗ビルドのコンソール」カラムを追加します

【Jenkins】ビューのカラムにプログレスバーを表示できる「Progress Bar Column」紹介

はじめに 「Progress Bar Column」を Jenkins に追加することで ビューのカラムにプログレスバーを表示できるようになります 使用例 使い方 ビューの変更で「ビルドの進捗」カラムを追加します

【Jenkins】ビューの横幅を変更する方法

概要 上記の theme.css を JENKINS_HOME フォルダの「userContent」に格納して 「Jenkinsの管理 > システムの設定 > Theme」に URL を追加することで ビューの横幅を変更できます

【Jenkins】ログに色付けできる「Log Parser」紹介

はじめに 「Log Parser」を Jenkins に追加することで ログに色付けできるようになります 使用例 使い方 上記のようなルールファイルを JENKINS_HOME フォルダの「userContent」に格納して pipeline { agent any stages { stage('Log') { steps { script { e…

【Jenkins】ビルドを実行した人がわかる「Build Trigger Badge」紹介

はじめに 「Build Trigger Badge」を Jenkins に追加することで ビルドを実行した人がわかるようになります 使用例 ビルド履歴にアイコンが表示されるようになる ユーザーアイコンにカーソルを合わせるとビルドを実行した人がわかる

【Jenins】Pipeline のコンソール出力にタイムスタンプを表示する方法

概要 pipeline { options { timestamps() } stages { stage('Initialize') { steps { script { // ... } } } } } timestamps を使用する

【Jenkins】ビューのカラムの設定が保存されている場所

概要 「JENKINS_HOME」の「config.xml」にビューのカラムの設定が保存されている <columns> <hudson.views.StatusColumn/> <jenkins.plugins.extracolumns.ConfigureProjectColumn plugin="extra-columns@1.25"/> <hudson.views.BuildButtonColumn/> <jenkins.plugins.extracolumns.LastBuildConsoleColumn plugin="extra-columns@1.25"/> </jenkins.plugins.extracolumns.lastbuildconsolecolumn></hudson.views.buildbuttoncolumn/></jenkins.plugins.extracolumns.configureprojectcolumn></hudson.views.statuscolumn/></columns>

【Jenkins】ビューのカラムに次のビルド時刻を表示できる「next-executions」紹介

はじめに 「next-executions」を Jenkins に追加することで ビューのカラムに次のビルド時刻を表示できるようになります 使用例 使い方 ビューの変更で「次のビルド時刻」カラムを追加します 「Jenkinsの管理 > システムの設定 > Next Executions Configurat…

【Jenkins】ビューのカラムに最新のステータスを表示できる「Compact Columns」紹介

はじめに 「Compact Columns」を Jenkins に追加することで 最新のステータスの日時を「yyyy/MM/dd HH:mm」形式で表示できます 最後のビルドが成功したか失敗したかによって文字色が変わります ジョブの名前も最後のビルドが成功か失敗かによって文字色を変…

【Jenkins】VSCode で .jenkinsfile のコード補完が大量に使用できる「Jenkins Doc」紹介

はじめに 「Jenkins Doc」を VSCode に追加することで .jenkinsfile のコード補完が大量に使用できるようになります 使用例 補足 「JenkinsFile Support」と比べるとシンタックスハイライトは効かないが コード補完は充実している印象

【Jenkins】すべてのジョブに一括でタイムアウトを設定する方法

概要 「Jenkinsの管理 > システムの設定 > Global Build Time Out」の 「Enable Global Time Out」をオンにすると すべてのジョブに一括でタイムアウトを設定できるようだった 試しに設定してみたが自分の環境ではタイムアウトしなかった