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
Vector2 v2; | |
void OnGUI () | |
{ | |
v2 = EditorGUILayout.Vector2Field ("", v2); | |
EditorGUIUtility.SetIconSize (v2); | |
Debug.Log (EditorGUIUtility.GetIconSize ()); | |
tex = (Texture2D)EditorGUI.ObjectField (new Rect (0, 50, 100, 100), tex, typeof(Texture2D)); | |
GUI.Label (new Rect (0, 150, 100, 30), EditorGUIUtility.ObjectContent (tex, typeof(Texture2D))); | |
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
function GetUnity() { | |
return document.getElementById("UnityEmbed") | |
} | |
function SendMessage(name, method, parameter) { | |
GetUnity().postMessage(name + "." + method + "(" + parameter + ")") | |
} |
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 Example : MonoBehaviour | |
{ | |
long time = 5000; | |
void Start () | |
{ | |
AndroidJNI.AttachCurrentThread (); |
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 Example : MonoBehaviour | |
{ | |
void Start () | |
{ | |
MaterialPropertyBlock mpb = new MaterialPropertyBlock (); | |
//赤色の情報を加える | |
mpb.AddColor ("_Color", Color.red); |
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 static WWW www; | |
static UpdateCheck () | |
{ | |
www = new WWW ("URL"); | |
EditorApplication.update += _Update; | |
} | |
private static void _Update () | |
{ |
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
IEnumerator _CheckStart () | |
{ | |
WWW www = new WWW ("URL"); | |
yield return www; | |
Debug.Log (www.text); | |
} |
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.Collections; | |
[InitializeOnLoad] | |
public class UpdateCheck : MonoBehaviour | |
{ | |
static UpdateCheck () | |
{ | |
if (EditorApplication.timeSinceStartup < 10) |
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
IEnumerator Start () | |
{ | |
particleSystem.Play (); | |
yield return new WaitForSeconds(3); | |
particleSystem.Stop (); | |
yield return new WaitForSeconds(3); | |
particleSystem.Play (); | |
//yield return new WaitForSeconds(3); | |
//particleSystem.Pause (); | |
//yield return new WaitForSeconds(3); |
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
IEnumerator Start () | |
{ | |
particleSystem.Play (); | |
yield return new WaitForSeconds(3); | |
particleSystem.Stop (); | |
yield return new WaitForSeconds(3); | |
particleSystem.Play (); | |
yield return new WaitForSeconds(3); | |
particleSystem.Pause (); | |
yield return new WaitForSeconds(3); |
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 Script : MonoBehaviour | |
{ | |
public int w = 100; | |
private Texture2D tex; | |
void Update () | |
{ |