コガネブログ

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

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

【Jenkins】Pipeline で sleep する方法

概要 sleep(time:5, unit:"SECONDS") sleep を使用する pipeline { agent any stages { stage('Initialize') { steps { script { sleep(time:5, unit:"SECONDS") echo "A" } } } } }

【Jenkins】Pipeline で最後のログ出力からの経過時間でタイムアウトする方法

概要 timeout(time: 10, unit: "SECONDS", activity: true) timeout で activity: true を設定すると 最後のログ出力からの経過時間でタイムアウトを設定できる pipeline { agent any options { timeout(time: 10, unit: "SECONDS", activity: true) } stage…

【Jenkins】サイドバーに独自リンクを追加できる「Sidebar Link」紹介

はじめに 「Sidebar Link」を Jenkins に追加することで サイドバーに独自リンクを追加できるようになります 使い方 「Jenkins の管理 > システムの設定 > 追加のサイドバーリンク」で 「リンクを追加」を押して URL やテキストを設定することで サイドバー…

【Windows】エクスプローラーで SVG のサムネイルを表示する方法

はじめに 上記のページにアクセスして 自分の PC に対応している .exe をダウンロードしてインストールする インストール前 インストール後

【Jenkins】Jenkins Pipeline でグローバル変数を定義する方法

概要 def name = "" pipeline { agent any stages { stage('1') { steps { script { name = "ピカチュウ" } } } stage('2') { steps { script { echo "${name}" } } } } } 上記のようなコードを記述する 参考サイト様

【Jenkins】Jenkins Pipeline で JSON を読み込む方法

概要 「Pipeline Utility Steps」プラグインを Jenkins に追加して pipeline { agent any stages { stage('Test') { steps { script { def json = readJSON file: 'data.json' echo "${json.id}" echo "${json.name}" echo "${json["id"]}" echo "${json["na…

【Jenkins】java.lang.NoSuchMethodError: No such DSL method 'readJSON' found among steps

概要 pipeline { agent any stages { stage('Test') { steps { script { def json = readJSON file: 'data.json' } } } } } Jenkins Pipeline で readJSON を使おうとしたら以下のエラーが発生した java.lang.NoSuchMethodError: No such DSL method 'readJS…

【Jenkins】VSCode から .jenkinsfile を直接実行できる「Jenkins Jack」紹介

はじめに 「Jenkins Jack」を VSCode に追加することで VSCode から .jenkinsfile を直接実行できるようになります 準備 .jenkinsfile を直接実行するためには VSCode と Jenkins を接続する必要があります 「Jenkins Jack」を VSCode に追加したら 左メニュ…

【Jenkins】VSCode で .jenkinsfile のシンタックスハイライトやコード補完が使用できる「JenkinsFile Support」紹介

はじめに 「JenkinsFile Support」を VSCode に追加することで .jenkinsfile のシンタックスハイライトやコード補完が使用できるようになります 使用例

【VSCode】パンくずリストを非表示にする方法

はじめに 「Breadcrumbs: Enabled」をオフにする

【Jenkins】fatal: Cannot prompt because user interactivity has been disabled.

概要 fatal: Cannot prompt because user interactivity has been disabled. Jenkins で Git のリポジトリ URL に HTTPS 形式の URL を指定したら 上記のエラーが発生する現象に遭遇した GitHub の「Settings > Developer settings > Personal access tokens…

【Jenkins】リポジトリ : Error performing git command: git.ext ls-remote -h XXXX.git HEAD との接続に失敗しました。

概要 リポジトリ : Error performing git command: git.ext ls-remote -h XXXX.git HEAD との接続に失敗しました。 Jenkins で Git のリポジトリ URL を指定した時に 上記のエラーが発生する現象に遭遇した 「Jenkinsの管理 > Global Tool Configuration」を…

【Unity】FSBTool ERROR: Preview file already set! Cannot have multiple preview files.

概要 Errors during import of AudioClip Assets/XXXX.wav: FSBTool ERROR: Preview file already set! Cannot have multiple preview files. FSBTool ERROR: Could not initialise FSBank. Error code: 10 FSBTool ERROR: Could not initialise FSBank: Alr…

【Unity】Scene ビューの「AI Navigation」を消す方法

概要 Unity 2022.2 にアップデートしたら Scene ビューに 「AI Navigation」というウィンドウが表示されるようになった 「AI Navigation」ウィンドウを右クリックして「Hide」を押すか 「Package Manager」で「AI Navigation」を「Remove」すれば表示されな…

【Unity】[Package Manager Window] Error searching for packages.

概要 [Package Manager Window] Error searching for packages. Unable to perform online search: Cannot fetch authorization code. User access token is expired or invalid. You may need to sign out and sign in again. UnityEditor.EditorApplicatio…

【Unity】スクリプトから MonoScript のアイコンを設定する例

概要 using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var monoImporter = ( MonoImporter )AssetImporter.GetAtPath( "Assets/Example.cs" ); var iconContent = EditorGUI…

【Unity】Android の Firebase Analytics でログが送信できているかすぐに確認する方法

はじめに using Firebase.Analytics; using UnityEngine; public class Example : MonoBehaviour { private void Start() { FirebaseAnalytics.LogEvent( "test" ); } } 上記のように FirebaseAnalytics.LogEvent で送信したログが Analytics Dashboard に反…

【Unity】AggregateException から FirebaseException を取得する拡張メソッド

ソースコード using System; using System.Linq; using Firebase; namespace Kogane { public static class AggregateExceptionExtensionMethods { public static bool IsFirebaseException( this AggregateException self ) { return self .Flatten() .Inne…

【Unity】FirebaseException の ErrorCode を列挙型に変換する拡張メソッド

ソースコード using Firebase; using Firebase.Auth; namespace Kogane { public static class FirebaseExceptionExtensionMethods { public static AuthError GetAuthError( this FirebaseException self ) { return ( AuthError )self.ErrorCode; } } } 使…

【Unity】Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated.

概要 Gradle failed to fetch dependencies. Failed to run 'UnityProject\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "UnityProject\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDRO…

【Unity】オフラインの時に FirebaseRemoteConfig.FetchAsync で発生するエラーや例外

概要 Unity エディタ fetching failure: http code 0 FirebaseException iOS FirebaseException: インターネット接続がオフラインのようです。 FirebaseException: Failed to get installations token. Android FirebaseException: The client had an error …

【Unity】fetching failure: http code 400

概要 fetching failure: http code 400 FirebaseException: No Error Message Unity エディタで Firebase の Remote Config の FirebaseRemoteConfig.FetchAsync を実行したら 上記のエラーが発生する現象に遭遇した Unity エディタを再起動したら発生しなく…

【Unity】FirestoreException: Failed to get document because the client is offline.

はじめに using Firebase.Firestore; using UnityEngine; public class Example : MonoBehaviour { private async void Start() { var firestore = FirebaseFirestore.DefaultInstance; var documentReference = firestore .Collection( "users" ) .Document…

【Unity】FirestoreException: Failed to get document from cache.

はじめに using Firebase.Firestore; using UnityEngine; public class Example : MonoBehaviour { private async void Start() { var firestore = FirebaseFirestore.DefaultInstance; var documentReference = firestore .Collection( "users" ) .Document…

【Unity】Firestore の DocumentReference.GetSnapshotAsync はオフラインの場合処理に時間がかかることがある

はじめに using Firebase.Firestore; using UnityEngine; public class Example : MonoBehaviour { private async void Start() { var firestore = FirebaseFirestore.DefaultInstance; var documentReference = firestore .Collection( "users" ) .Document…

【Unity】Firestore の CollectionReference.AddAsync はオフラインの場合 Task が完了しない

概要 using System.Collections.Generic; using Firebase.Firestore; using UnityEngine; public class Example : MonoBehaviour { private async void Start() { var firestore = FirebaseFirestore.DefaultInstance; var collectionReference = firestore …

【Unity】Firestore の DocumentReference.SetAsync はオフラインの場合 Task が完了しない

概要 using System.Collections.Generic; using Firebase.Firestore; using UnityEngine; public class Example : MonoBehaviour { private async void Start() { var firestore = FirebaseFirestore.DefaultInstance; var documentReference = firestore .C…

【Unity】DOTWEEN ► Max Tweens reached: capacity has automatically been increased from 200/50 to 200/125. Use DOTween.SetTweensCapacity to set it manually at startup

概要 DOTWEEN ► Max Tweens reached: capacity has automatically been increased from 200/50 to 200/125. Use DOTween.SetTweensCapacity to set it manually at startup DOTween を使用していて上記の警告が出力された場合は using DG.Tweening; using Un…

【Python】Failed to determine matplotlib's data directory!

概要 Failed to determine matplotlib's data directory! pyinstaller 実行時に上記のエラーが発生する現象に遭遇した pip uninstall pathlib 上記のコマンドで pathlib をアンインストールしたらエラーが発生しなくなった 参考サイト様

【Unity】[Package Manager Window] Cannot perform upm operation: Unable to add package [file:XXXX.tgz]:

概要 [Package Manager Window] Cannot perform upm operation: Unable to add package [file:com.google.firebase.analytics-10.2.0.tgz]: Package com.google.firebase.analytics@file:XXXX\com.google.firebase.analytics-10.2.0.tgz has invalid depende…