2019-09-03から1日間の記事一覧
ソースコード using System.Collections.Generic; public static class KeyValuePairExt { public static void Deconstruct<TKey, TValue> ( this KeyValuePair<TKey, TValue> self, out TKey key, out TValue value ) { key = self.Key; value = self.Value; } } 使用例 通常 foreach ( </tkey,></tkey,>…
ソースコード using UnityEngine; public static class Vector2Ext { public static void Deconstruct ( this Vector2 self, out float x, out float y ) { x = self.x; y = self.y; } } 使用例 通常 var vec = new Vector2( 1, 2 ); Deconstruction var ( x…
ソースコード using UnityEngine; public static class Vector2IntExt { public static void Deconstruct ( this Vector2Int self, out int x, out int y ) { x = self.x; y = self.y; } } 使用例 通常 var vec = new Vector2Int( 1, 2 ); Deconstruction va…
ソースコード using UnityEngine; public static class Vector3Ext { public static void Deconstruct ( this Vector3 self, out float x, out float y, out float z ) { x = self.x; y = self.y; z = self.z; } } 使用例 通常 var vec = new Vector3( 1, 2,…
ソースコード using UnityEngine; public static class Vector3IntExt { public static void Deconstruct ( this Vector3Int self, out int x, out int y, out int z ) { x = self.x; y = self.y; z = self.z; } } 使用例 通常 var vec = new Vector3Int( 1,…
ソースコード using UnityEngine; public static class Vector4Ext { public static void Deconstruct ( this Vector4 self, out float x, out float y, out float z, out float w ) { x = self.x; y = self.y; z = self.z; w = self.w; } } 使用例 通常 var…
ソースコード using System; public static class DateTimeExt { public static void Deconstruct ( this DateTime self, out int year, out int month, out int day ) { year = self.Year; month = self.Month; day = self.Day; } } 使用例 通常 var dt = D…
ソースコード using UnityEngine; public static class ColorExt { public static void Deconstruct ( this Color self, out float r, out float g, out float b ) { r = self.r; g = self.g; b = self.b; } public static void Deconstruct ( this Color se…
ソースコード using UnityEngine; public static class Color32Ext { public static void Deconstruct ( this Color32 self, out byte r, out byte g, out byte b ) { r = self.r; g = self.g; b = self.b; } public static void Deconstruct ( this Color32…
ソースコード using UnityEngine; public static class RectExt { public static void Deconstruct ( this Rect self, out Vector2 position, out Vector2 size ) { position = self.position; size = self.size; } public static void Deconstruct ( this R…
ソースコード public static class NullableExt { public static void Deconstruct<T> ( this T? self, out bool hasValue, out T value ) where T : struct { hasValue = self.HasValue; value = self ?? default; } } 使用例 var now = DateTime.Now; var ( h</t>…
PDF 参考ツイート Unityについてのノウハウをまとめました。パフォーマンス改善とデータサイズ削減を中心として書いています。https://t.co/J0LGIoNDA1#Unity #UnityTips— 坂本龍 (@SakamotoRyuu) August 5, 2019
概要 上記のスクリプトを Unity プロジェクトに追加して TextMesh Pro のオブジェクトにアタッチします そして、TextMesh Pro のテキストに <link="https://www.google.co.jp/">Google</link> 上記のような link タグを使用した文字列を設定します
概要 Ctrl + Shift + V で過去にコピーした履歴からペーストできます 参考サイト様
概要 Windows スタートメニューから「サウンドの設定」を開きます 「サウンドコントロールパネル」を開きます 「サウンド」タブを選択して、プログラムイベントの 「Microsoft Visual Studio」の項目からサウンドを再生したいタイミングを選び、 再生したい…
概要 Ctrl キーを押している間は IntelliSense を半透明にできます 参考サイト様
概要 Visual Studio メニューの「ツール > オプション」から 「プロジェクトおよびソリューション > 全般」の ソリューションの読み込み時にドキュメントを再度開く ソリューションの読み込み時に、ソリューションエクスプローラーのプロジェクトの階層状態…
概要 Visual Studio では Ctrl + T でファイル、クラスを検索できます 参考サイト様
概要 コンパイルエラーが存在する場合は Unity IAP を正常にインポートできないので、 コンパイルエラーを修正してからインポートする必要がある