【space】 ・・・・ツール検索 ctr + ⌥ + 【U】 ・・・ユーザー設定画面表示
【tab】 ・・・モード変更
【shift + C】 ・・・3Dカーソルをセンターに持ってくる ※パースペクティブで実行すると全座標原点に移動する
| //参考 | |
| //http://docs.unity3d.com/ScriptReference/Rigidbody-detectCollisions.html | |
| transform.rigidbody.detectCollisions = false; | |
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| public class CoroutineManager : MonoBehaviour { | |
| private static int coroutineID = 0; | |
| private Dictionary<int, IEnumerator> _dic; | |
| public object GretCurrent (int id) |
| public void AddRange (IEnumerable<T> collection) | |
| { | |
| if (collection == ) { | |
| throw new ArgumentNullException (); | |
| } | |
| ICollection<T> collection2 = collection as ICollection<T>; | |
| if (collection2 != ) { | |
| this.AddCollection (collection2); | |
| } | |
| else { |
| using UnityEngine; | |
| using System.Collections; | |
| using UnityEditor; | |
| /// <summary> | |
| /// 選択したWidget内にある画像を表示する | |
| /// </summary> | |
| public class SelectedWidgetImage : EditorWindow | |
| { | |
| [MenuItem("Window/SelectedWidgetImage")] | |
| static public void Init () |
| public static bool TryParse (string s, out float result) | |
| { | |
| return float.TryParse (s, NumberStyles.Any, , out result); | |
| } |
| static public bool TryGetCoordinate (Vector3 mousePosition, Camera cam, out Vector3 worldPosition) | |
| { | |
| // 3D上の座標を取得したい平面を生成 | |
| Plane plane = new Plane (Vector3.up, Vector3.zero); | |
| // インプットスクリーン座標とカメラ位置を通る直線を求める | |
| Ray ray = cam.ScreenPointToRay (mousePosition); | |
| float depth; | |
| // 平面とrayが交差するかチェック | |
| // 第2引数は交差した際に距離(float)が返却される | |
| if (plane.Raycast(ray, out depth)) |
| // | |
| // ViewController.swift | |
| // helloworld-swift | |
| // | |
| // Created by Shunsuke Ohba on 2014/10/04. | |
| // Copyright (c) 2014年 Shunsuke Ohba. All rights reserved. | |
| // | |
| import UIKit |
| extension UIView | |
| { | |
| var anchorPoint:CGPoint { | |
| get { | |
| return self.layer.anchorPoint | |
| } | |
| set { | |
| self.layer.anchorPoint = newValue | |
| } | |
| } |
| class SortTest { | |
| void Start () | |
| { | |
| List<Foo> a = new List<Foo> (); | |
| a.Add (new Foo (1)); | |
| a.Add (new Foo (100)); | |
| a.Add (new Foo (30)); | |
| a.Add (new Foo (20)); | |
| a.Add (new Foo (99)); |