コガネブログ

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

2022-09-14から1日間の記事一覧

【Unity】Mac で Unity から指定したアプリケーションでアセットを開く方法

概要 [MenuItem( "Tools/hoge" )] public static void Hoge() { var assetPath = "【アセットのパス】"; var fullPath = Path.GetFullPath( assetPath ); // Photoshop で開く例 Process.Start( @"open", $@"-a ""/Applications/Adobe Photoshop 2022/Adobe …

【Unity】Mac で Unity から別アプリケーションでアセットを開く方法

概要 [MenuItem( "Tools/hoge" )] public static void Hoge() { var assetPath = "【アセットのパス】"; var fullPath = Path.GetFullPath( assetPath ); Process.Start( @"open", fullPath ); }

【Unity】Mac で Unity から別のアプリケーションを終了する方法

概要 [MenuItem( "Tools/Hoge" )] public static void Hoge() { Process.Start( @"pkill", "Microsoft Power Point" ); }

【Unity】Importer(TextScriptImporter) generated inconsistent result for asset(guid:XXXX) "YYYY"

概要 File.Move(sourceFileName, destFileName); FileUtil.MoveFileOrDirectory( source, dest ); 上記の関数でアセットのファイル名を変更したら AssetDatabase.ImportAsset のタイミングで Importer(TextScriptImporter) generated inconsistent result fo…

【Unity】Assertion failed on expression: 'it != m_SendMap.end()'

概要 Unity の Project ウィンドウで画像を選択したら Unity エディタが強制終了する現象に遭遇した Assertion failed on expression: 'it != m_SendMap.end()' ================================================================= Native Crash Reporting …

【Unity】Mac で Unity Accelerator のダッシュボードの URL を確認する方法

概要 /Applications/Unity/accelerator/unity-accelerator dashboard url

【Python】python-pptx で 16:9 のスライドを作成する方法

概要 ppt = Presentation() ppt.slide_width = Inches(16) ppt.slide_height = Inches(9) 上記のように設定する 参考サイト様

【Python】AttributeError: module 'collections' has no attribute 'abc'

概要 AttributeError: module 'collections' has no attribute 'abc' python-pptx を使おうとしたら実行時に上記のエラーが発生する現象に遭遇した import collections.abc 上記の import 文を追加したらエラーが発生しなくなった 参考サイト様

【Python】Mac で python3 インストール後に「command not found: python」が出た時にやったこと

概要 /Users/【ユーザー名】/.zshrc 上記のファイルを開いて(存在しない場合は作成してから開いて) alias python='python3' 上記のコードを入力して保存したら python コマンドが実行できるようになった 参考サイト様

【Unity】軽量な DI フレームワーク「Reflex」

リンク

【Unity】Scripting Define Symbols にシンボルが定義されていない場合にのみ Assembly Definition を有効化する方法

概要 Define Constraints に入力するシンボルの先頭に ! をつけると そのシンボルが Scripting Define Symbols に定義されていない場合にのみ Assembly Definition が有効化されるようになります 参考サイト様