Skip to content

Instantly share code, notes, and snippets.

@masa795
masa795 / InitOnLoad.cs
Created Jul 27, 2013
シーンをメニューから開く。メニューに表示するシーンは自動で作成される。 https://github.com/masa795/OpenSceneFromMenuCreator
View InitOnLoad.cs
using UnityEngine;
using UnityEditor;
namespace Nlib.Editor.Util
{
[InitializeOnLoad]
public class InitOnLoad
{
@masa795
masa795 / AddStress.cs
Last active Dec 20, 2015
UnityでCPU負荷をかける
View AddStress.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System;
using System.Threading;
public class AddStress : MonoBehaviour
{
#region 設定
@masa795
masa795 / test.cc
Last active Dec 21, 2015
string -> float -> doubleチェック
View test.cc
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class test : MonoBehaviour {
public float m_float = 0f;
public double m_double = 0d;
public string m_input = "";
public string m_out = "";
@masa795
masa795 / IconTest_002.cs
Created Sep 1, 2013
EditorWindowに好きなアイコンを付ける
View IconTest_002.cs
using UnityEngine;
using UnityEditor;
public class IconTest_002 : EditorWindow {
[MenuItem("window icon/icon2")]
static void Init()
{
EditorWindow.GetWindow<IconTest_002>(false, "Firefox");
}
}
View GetIpAddress.cs
string targetSheet = "IP address取得";
if (GUILayout.Button(targetSheet, GUI.skin.button, GUILayout.Width(150), GUILayout.Height(30)))
{
// ホスト名を取得する
string hostname = Dns.GetHostName();
Debug.Log("hostname=" + hostname);
// ホスト名からIPアドレスを取得する
IPAddress[] adrList = Dns.GetHostAddresses(hostname);
foreach (IPAddress address in adrList)
@masa795
masa795 / FileIconTest2.cs
Created Oct 28, 2013
ボタンなどの画像サイズを変える
View FileIconTest2.cs
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class FileIconTest2 : EditorWindow
{
Vector2 scrollPosition;
[MenuItem("Window/File Icon2")]
@masa795
masa795 / ActiveScriptCompilationDefines.cs
Created Nov 2, 2013
ディレクティブ一覧を取得する
View ActiveScriptCompilationDefines.cs
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class ActiveScriptCompilationDefines : EditorWindow {
[MenuItem ("Window/Active Script Compilation Defines")]
static void Init () {
@masa795
masa795 / DragReSizeFiled.cs
Created Dec 7, 2013
GUIの横幅をマウスのドラッグで変更する
View DragReSizeFiled.cs
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class DragReSizeFiled : EditorWindow {
// Add menu item to the Window menu
[MenuItem("Window/DragReSizeFiled")]
static void Init () {
@masa795
masa795 / WindowNotification.cs
Created Mar 9, 2014
EditorWindow上に通知を表示する
View WindowNotification.cs
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class WindowNotification : EditorWindow {
// Add menu item to the Window menu
[MenuItem ("Window/Window Notification")]
static void Init () {
@masa795
masa795 / PhpStorm_jp
Last active Mar 25, 2018
PhpStormの日本語化
View PhpStorm_jp
# 日本語化
-Xverify:none
-javaagent:/Users/[ユーザー名]/Library/Preferences/PhpStorm2017.3/jp.sourceforge.mergedoc.pleiades/pleiades.jar