2015-01-01から1年間の記事一覧
Unity 5.3 から追加された「UnityEngine.ColorUtility」を使用して string型をColor型に変換する関数を管理するクラスを作成しました using UnityEngine; public static class MyColorUtility { /// <summary> /// 指定された文字列を Color 型に変換できる場合 true </summary>…
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { public bool _bool ; public byte _byte ; public sbyte _sbyte ; public char _char ; public decimal _decimal; // × public double _double ; public float _…
WaitForSeconds は Time.timescale に依存するため Time.timescale に 0 が代入されていると WaitForSeconds が完了することはありません もしも Time.timescale に依存しないようにしたい場合は Unity 5.3 から追加された 「CustomYieldInstruction」を使用…
概要 ColorHtmlPropertyAttribute.csをプロジェクトに追加して、 ColorHtmlPropertyDrawer.csをプロジェクトのEditorフォルダに追加して、 下記のようなスクリプトを記述することで、 Inspectorでカラーコードを入力して色を設定できるようになります using …
関連記事
関連記事
関連記事
関連記事
関連記事
関連記事
この記事はUnity Advent Calendar 2015の12日目の記事になります。 昨日は@Ijoruさんの「Unity UIでページやダイアログごとにシーンを分離する実装パターン」でした 今回は開発中のUnityプロジェクトをUnity 4.6からUnity 5.2に移行した時に 対応したことや…
関連記事
関連記事
関連記事
関連記事
var path = ""; Debug.Log( FileUtil.GetProjectRelativePath( path ) ); FileUtil.GetProjectRelativePathを使用することで 指定したファイルのプロジェクトからの相対パスを取得することができます
概要 関連記事
ソースコード using System; using System.Collections.Generic; public static class IListExtensions { /// <summary> /// <para>シーケンス内の指定されたインデックス位置にある要素を返します。</para> /// <para>インデックスが範囲外の場合は既定値を返します。</para> /// </summary> public stati…
Unityのタイトルバーを見ることで確認可能です Direct3D 9 Direct3D 11 OpenGL
using UnityEngine; public static class IntExtensions { public static float Clamp( this int value, int min, int max ) { return Mathf.Clamp( value, min, max ); } } public static class FloatExtensions { public static float Clamp( this float v…
関連記事
関連記事
An asset is marked with HideFlags.DontSave but is included in the build: Building - Failed to write file: BuildPlayer-XXXX.sharedAssets Error building Player: Couldn't build player because of unsupported data on target platform. BuildPipel…
概要 ソースコードに全角スペースが入力されている時に遭遇
方法 using System.Collections.Generic; using System.Linq; ... var list = new List<List<int>>(); var result = list.SelectMany( c => c ).ToList();</list<int>
関連記事
ソースコード using LitJson; using System.Text; public static class JsonUtils { public static string ToJson<T>( T obj ) { var builder = new StringBuilder(); var writer = new JsonWriter( builder ) { PrettyPrint = true }; JsonMapper.ToJson( obj,</t>…
メニューの「Window>Profiler」を選択する 「Memory」を選択する
Final Fantasy Record Keeperのマスターデータを支える技術 from dena_study