2018-09-01から1ヶ月間の記事一覧
はじめに 上記の GitHub で公開されている「Unity Code Snippets for Visual Studio」フォルダを Visual Studio のコードスニペットに追加することで Debug.Log の記述を楽にするコードスニペットを使用できるようになります 使い方 Log や LogFormat と入力…
概要 2018/9/14 に「Await Extensions」がリリースされました 「Await Extensions」を導入すると、 Unity の機能を async / await で使用できるようになります 検証環境 Unity 2017.4.7f1 Await Extensions 1.0 使用例
はじめに https://bitbucket.org/Unity-Technologies/ui/src uGUI のソースコードは Bitbucket で公開されているため、 自分で編集して使用することができます 変更例 https://bitbucket.org/Unity-Technologies/ui/downloads/ 上記のページにアクセスして「…
はじめに https://bitbucket.org/Unity-Technologies/ui/src/2017.3/UnityEngine.UI/UI/Core/MaskableGraphic.cs protected override void OnEnable() { ... if (GetComponent<Mask>() != null) { MaskUtilities.NotifyStencilStateChanged(this); } } protected o</mask>…
方法1 C:\Users\【ユーザー名】\Documents\Visual Studio 2017\Code Snippets\【言語】\My Code Snippets 上記のフォルダに .snippet を追加します もしくは .snippet が格納されているフォルダを追加します 方法2 Visual Studio のメニューの「ツール>コー…
概要 作成したスニペットを使用した時に最初に改行されてしまう場合、 <Code Language="csharp"></Code> スニペットテキストのどこかに <Code Language="csharp"></Code> 「$end$」と記述することで 参考サイト様
概要 Error Code: 1 occurred while Loading the [XXXX] font file. This typically results from the use of an incompatible or corrupted font file. TextMesh Pro で FontAsset を作成しようとした時に上記のエラーが発生した フォントのファイル名に日…
概要 <script src="http://gist-it.appspot.com/http://github.com/【GitHub のコードの URL】"></script> 上記のコードをはてなブログの記事に記述します (【GitHub のコードの URL】の部分を書き換えます) 補足 上記のコードは「gits-it」というサービスを使用しています http://gist-it.appspot.com/
概要 参考サイト様
概要 参考サイト様
概要 参考サイト様
はじめに http://www.shaderslab.com/demo-42---varying-color-with-ramp-texture.html この記事では上記のサイト様が公開されている ランプテクスチャにより色が変化するシェーダを導入する方法を紹介していきます 使用例 使い方 上記のシェーダファイルを …
はじめに この記事では上記のリポジトリに含まれている スプライト用のシェーダを導入する方法を紹介していきます 使用例 使い方 上記のシェーダファイルを Unity プロジェクトに追加します シェーダを使用したいオブジェクトのマテリアルの Shader を 「Spr…
概要 using UnityEngine; using UnityEngine.U2D; public class Example : MonoBehaviour { public SpriteAtlas m_atlas; private void Update() { m_atlas.GetSprite( "goal_01" ); } } 例えば上記のように Update 関数で毎フレーム SpriteAtlas.GetSprite …
概要 var path = @"D:\Hoge\Fuga"; EditorUtility.RevealInFinder( path ); EditorUtility.RevealInFinder を使用する
はじめに この記事では上記のリポジトリに含まれている スプライト用のアウトラインシェーダを導入する方法を紹介していきます 使用例 使い方 上記のシェーダファイルを Unity プロジェクトに追加します シェーダを使用したいオブジェクトのマテリアルの Sha…
概要 [MenuItem( "Tools/⚙ Settings..." )] private static void Hoge() { } MenuItem に指定する文字列に絵文字を設定するだけで使用できる 使用できない絵文字や、Mac だと表示されるけど Windows 7 だと表示されない絵文字があるので注意
概要 if ( iOS.DeviceGeneration.generation == DeviceGeneration.iPhoneX ) { } 参考サイト様
概要 var are = Screen.safeArea; 参考サイト様
概要 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…
検証環境 Windows 7 Unity 2018.2.7f1 起動時間 Default:1.829 秒 LZ4:1.688 秒 参考サイト様
概要 Unity の Console ウィンドウを右クリックして「Open Editor Log」を選択する もしくは C:\Users\【ユーザー名】\AppData\Local\Unity\Editor\Editor.log を開く 下記のようなテキストを検索する *** Completed 'Build.Player.AndroidPlayer' in 55 sec…
検証環境 Windows 7 Unity 2018.2.7f1 ビルド時間 Internal:55 秒 Gradle:60 秒
概要 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…
はじめに http://www.shaderslab.com/demo-53---vertex-color-depending-id.html この記事では上記のサイト様が公開されている 頂点カラーを変更するシェーダを導入する方法を紹介していきます 使用例 使い方 上記のシェーダファイルを Unity プロジェクトに…
はじめに http://www.shaderslab.com/demo-34---cosmic-effect.html この記事では上記のサイト様が公開されている コズミックシェーダを導入する方法を紹介していきます 使用例 使い方 上記のシェーダファイルを Unity プロジェクトに追加します シェーダを…
はじめに http://www.shaderslab.com/demo-95---flag-with-lighting.html この記事では上記のサイト様が公開されている アウトライン付きのスクリーンスペーステクスチャシェーダを 導入する方法を紹介していきます 使用例 適用前 適用後 使い方 上記のシェ…
概要 Scene に配置されているオブジェクトを選択して、 Inspector でコンポーネントを右クリックして「Find references in scene」を選択すると そのコンポーネントを参照しているオブジェクトを Hierarchy で検索することができます
概要 using UnityEditor; public class Hoge : EditorWindow { [MenuItem( "Tools/Hoge" )] private static void Open() { GetWindow<Hoge>( "ここに12文字まで入るみたいです" ); } }</hoge>
概要 Android プラットフォームの「PlayerSettings」に 「Start in fullscreen mode」が追加されました 「Start in fullscreen mode」がオン 「Start in fullscreen mode」がオフ