コガネブログ

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

2018-09-13から1日間の記事一覧

【Unity】MenuItem で絵文字を表示する

概要 [MenuItem( "Tools/⚙ Settings..." )] private static void Hoge() { } MenuItem に指定する文字列に絵文字を設定するだけで使用できる 使用できない絵文字や、Mac だと表示されるけど Windows 7 だと表示されない絵文字があるので注意

【Unity】iPhone X かどうかを確認する方法

概要 if ( iOS.DeviceGeneration.generation == DeviceGeneration.iPhoneX ) { } 参考サイト様

【Unity】セーフエリアを取得する方法

概要 var are = Screen.safeArea; 参考サイト様

【Unity】Unity 2018.2.7f1 で Android の IL2CPP ビルドしようとしたらエラーが発生して解決できなかった話

概要 Failed running C:\Program Files\Unity 2018.2.7f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --config…

【Unity】Android プラットフォームで Compression Method を「Default」にした場合と「LZ4」にした場合でアプリの起動時間にどれくらい差があるか

検証環境 Windows 7 Unity 2018.2.7f1 起動時間 Default:1.829 秒 LZ4:1.688 秒 参考サイト様

【Unity】アプリのビルドにかかった時間を調べる方法

概要 Unity の Console ウィンドウを右クリックして「Open Editor Log」を選択する もしくは C:\Users\【ユーザー名】\AppData\Local\Unity\Editor\Editor.log を開く 下記のようなテキストを検索する *** Completed 'Build.Player.AndroidPlayer' in 55 sec…

【Unity】Android プラットフォームで Internal ビルドした場合と Gradle ビルドした場合でビルド時間にどれくらい差があるか

検証環境 Windows 7 Unity 2018.2.7f1 ビルド時間 Internal:55 秒 Gradle:60 秒

【Unity】Your current multi-scene setup has inconsistent Lighting settings which may lead to different lighting when loading scenes individually or in a different order! Consider homogenizing the following:

概要 Your current multi-scene setup has inconsistent Lighting settings which may lead to different lighting when loading scenes individually or in a different order! Consider homogenizing the following: 1/2 scenes have different Realtime G…

【Unity】頂点カラーを変更するシェーダを導入する

はじめに http://www.shaderslab.com/demo-53---vertex-color-depending-id.html この記事では上記のサイト様が公開されている 頂点カラーを変更するシェーダを導入する方法を紹介していきます 使用例 使い方 上記のシェーダファイルを Unity プロジェクトに…

【Unity】コズミックシェーダを導入する

はじめに http://www.shaderslab.com/demo-34---cosmic-effect.html この記事では上記のサイト様が公開されている コズミックシェーダを導入する方法を紹介していきます 使用例 使い方 上記のシェーダファイルを Unity プロジェクトに追加します シェーダを…

【Unity】アウトライン付きのスクリーンスペーステクスチャシェーダを導入する

はじめに http://www.shaderslab.com/demo-95---flag-with-lighting.html この記事では上記のサイト様が公開されている アウトライン付きのスクリーンスペーステクスチャシェーダを 導入する方法を紹介していきます 使用例 適用前 適用後 使い方 上記のシェ…