This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using System.Text; | |
public class NewBehaviourScript{ | |
[MenuItem("Window/Save")] | |
static void Save (){ | |
EditorPrefs.SetString ("Hoge", ToBase64 ("日本語")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class NewBehaviourScript : MonoBehaviour | |
{ | |
public GUIStyle Btn; | |
void OnGUI () | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class Example : MonoBehaviour | |
{ | |
static Example _instance; | |
void Awake () | |
{ | |
if (_instance != null) { | |
Destroy (gameObject); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class Test : MonoBehaviour | |
{ | |
//targetB | |
private Plane plane; | |
public Transform targetA; | |
void Start () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#gameData :file").change(function (e) { | |
var file = e.target.files[0]; | |
var reader = new FileReader(); | |
reader.onload = function (load) { | |
var uni = load.target.result; | |
uni = uni.replace("data:base64", "data:application/vnd.unity;base64") | |
unityObject.embedUnity("unityPlayer",uni, 600,450); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
public class Delay : Editor | |
{ | |
[MenuItem("EditorApplication/StartDelayCall")] | |
static void StartDelay () | |
{ | |
EditorApplication.delayCall += CallMethod; | |
Debug.Log (EditorApplication.timeSinceStartup); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MacBook Pro | |
13-inch, Early 2011 | |
プロセッサ 2.3 GHz Intel Core i5 | |
メモリ 8 GB 1333 MHz DDR3 | |
グラフィックス Intel HD Graphics 3000 512 MB | |
ソフトウェア Mac OS X Lion 10.7.3(11D50d) | |
Parallels | |
バージョン: 7.0.15098.770637 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
public class RenderGameViewCamerasScript : EditorWindow | |
{ | |
[MenuItem("EditorGUIUtility/RenderGameViewCameras")] | |
static void OpenWindow () | |
{ | |
RenderGameViewCamerasScript window = GetWindow<RenderGameViewCamerasScript> (); | |
window.position = new Rect (50, 50, 500, 500); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Rect rect1, rect2; | |
private bool stats, gizmos, on; | |
void OnGUI (){ | |
on = EditorGUILayout.Toggle (on); | |
rect1 = EditorGUILayout.RectField (rect1); | |
rect2 = new Rect (0, 22, position.width, position.height); | |
stats = EditorGUILayout.Toggle ("stats :", stats); | |
gizmos = EditorGUILayout.Toggle ("gizmos :", gizmos); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instance ID: 2 Object's name: VertexLit | |
Instance ID: 4 Object's name: Legacy Shaders/Diffuse Fast | |
Instance ID: 6 Object's name: Diffuse | |
Instance ID: 8 Object's name: Bumped Diffuse | |
Instance ID: 10 Object's name: Specular | |
Instance ID: 12 Object's name: Bumped Specular | |
Instance ID: 14 Object's name: Diffuse Detail | |
Instance ID: 16 Object's name: Self-Illumin/VertexLit | |
Instance ID: 18 Object's name: Self-Illumin/Diffuse | |
Instance ID: 20 Object's name: Self-Illumin/Bumped Diffuse |