Skip to content

Instantly share code, notes, and snippets.

View anchan828's full-sized avatar

Keigo Ando anchan828

  • Unity Technologies
  • Japan
  • 09:36 (UTC +09:00)
  • X @kyusyukeigo
View GitHub Profile
private static void ClearConsoleLogs()
{
var type = Types.GetType("UnityEditorInternal.LogEntries", "UnityEditor");
var info = type.GetMethod("Clear", BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance);
info.Invoke(null, new object[0]);
}

Temp Run

使用するプロジェクト :

完成ゲーム「てんぷらん」 :

とりあえず完成しているゲームを見てみましょう。

環境を揃えましょう

update
upgrade
tap caskroom/cask
install brew-cask
tap caskroom/versions
install git
install nkf
install nodebrew
@anchan828
anchan828 / iTunes.cs
Created August 22, 2014 08:42
エディタ再生時にiTunesを一時停止&エディタ再生をやめた時にiTunesを再生する
using UnityEngine;
using UnityEditor;
using System.IO;
using System.Text;
[InitializeOnLoad]
public class iTunes
{
static iTunes ()
{
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEngine;
class HierarchyWindowHelper
{
private SerializedObject so;
<script type="text/javascript"src="http://code.jquery.com/jquery-1.7.1.min.js"></script><script type="text/javascript">$(function(){$(".unitygames").each(function(i){var t=$(this);t.html('<iframe width="100%" height="100%" src="'+t.attr("src")+'" frameborder="0"></iframe>')})});</script>
<script type="text/javascript"src="http://code.jquery.com/jquery-1.7.1.min.js"></script><script type="text/javascript">$(function(){$(".unitygames").each(function(i){var t=$(this);t.html('<iframe width="100%" height="100%" src="'+t.attr("src")+'" frameborder="0"></iframe>')})});</script>
@anchan828
anchan828 / gist:1681986
Created January 26, 2012 09:43
GetConponent
using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour
{
void Awake ()
{
gameObject.active = false;
}
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class RecoderManager : MonoBehaviour
{
public Texture2D playButton, pauseButton, stopButton, recodeBotton, recodingButton;
public GameObject play, pause, stop, recode, recoding, meta;
private const string RECODE_START = "RecodeStart", RECODE_STOP = "RecodeStop", PLAY = "Play", PAUSE = "Pause", STOP = "Stop";
private Ray r;
using UnityEngine;
using System.Collections;
public class Script : MonoBehaviour
{
public int w = 100;
private Texture2D tex;
void Update ()
{