2015-11-01から1ヶ月間の記事一覧
RGBの(255, 255, 255)みたいなのを6桁の16進数数字のカラーコードFFFFFFにしたい。 ※'#‘はいらない。 RGB値からHTMLカラーコードに変換する:humming bird を参考。 拡張メソッド // Slice. public static string Slice(this string aString, int num) { retu…
何故か出ない。 One of my scripts has no check-box next to it in Inspector - Unity Answers Your MonoBehaviour won't have a checkbox next to it in the inspector if it doesn't have any of the per-frame methods, like Update, FixedUpdate, OnGUI…
デフォルト引数(別名:省略可能な引数、オプション引数(optional parameter))を使って、 デリゲートすると変な現象。 まず、このようなデフォルト引数のあるメソッド void Hoge(int fooInt, bool barBool=false, int fugaInt=0) { Debug.LogError(fooInt…
#if UNITY_EDITOR みたいなやつをプリプロセッサーディレクティブと言うと思う。 publicな定義を作りたい。 Global Conditional Compilation with Unity3D Assets/smcs.rsp の中に -define:LITE と書いてやれば グローバルのカスタム define シンボルになる…
Hugoの使い方 http://gohugo.io/overview/quickstart/ 公式のここがいい。 まずプロジェクト作る hugo new site /path/to/site /path/to/siteに生成される。 作成先に移動 cd /path/to/site hugo new about.md これでプロジェクト直下/path/to/site/content/…
まずこれは行ける。 var ordinals = new string[] { "First", "Second", "Third" }; var indexed = ordinals.Select((n, i) => new { Index = i, Ordinal = n }) .Select((e) => { Debug.Log(e.Index); Debug.Log(e.Ordinal); return e; }).ToArray(); "Firs…
Hoge[] hoges をEditorWindowで出したい。 using UnityEngine; using UnityEditor; public class MyEditor : EditorWindow { [System.Serializable] // 必須. class Hoge { public bool boolHoge; public int intHoge; public string strHoge; } [SerializeF…
www.sitepoint.com
brew update すると、 error: unable to unlink old '.gitignore' (Permission denied) error: unable to create file .travis.yml (Permission denied) error: unable to unlink old '.yardopts' (Permission denied) error: unable to unlink old 'CONTRIB…
URL http://connpass.com/event/22061/ ドットインストールのRails 4のを見ながらElixir/Phoenixやってみる。 ・ドットインストール http://dotinstall.com/lessons/basic_rails_v2/ Elixir は ErlangのVM上で動くプログラミング言語です。 Elixirのバージョ…