Skip to content

Instantly share code, notes, and snippets.

View development.json
{
"websocket" : {
"port" : 9999
},
"logging" : true,
"const" : {
"env" : "development",
"ver" : "9999"
@masa795
masa795 / example.js
Created Mar 2, 2014
Node.jsサンプル
View example.js
var WebSocket = require('websocket').server,
Http = require('http'),
Config = require('config');
console.log("========= Start ===========");
console.log(new Date());
console.log("NODE_ENV="+process.env.NODE_ENV);
console.log("NODE_PATH="+process.env.NODE_PATH);
@masa795
masa795 / UnityEditor.txt
Last active Aug 29, 2015
Unity4.5.4で追加されたメソッド
View UnityEditor.txt
######################################
UnityEditor.PlayerSettings
static function
--------------------------------------------------
Boolean get_visibleInBackground()
Void set_visibleInBackground( Boolean value )
--------------------------------------------------
@masa795
masa795 / UnityEditor.txt
Created Oct 13, 2014
Unity4.5.5で追加されたメソッド
View UnityEditor.txt
######################################
UnityEditor.PlayerSettings
static function
--------------------------------------------------
Boolean get_d3d11ForceExclusiveMode()
Void set_d3d11ForceExclusiveMode( Boolean value )
--------------------------------------------------
@masa795
masa795 / DragAndDropTest.cs
Created May 15, 2013
Editor拡張でドラッグ&ドロップした時のファイルパスを取得する
View DragAndDropTest.cs
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.IO;
public class DragAndDropTest : EditorWindow
{
// Add menu item to the Window menu
@masa795
masa795 / FileIconTest.cs
Created May 17, 2013
AssetDatabase.GetCachedIconを使用してアイコンとラベルを表示する。 AssetDatabase.GetAllAssetPaths()で取得するのでファイル数が多いと重くなるかも。
View FileIconTest.cs
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class FileIconTest : EditorWindow {
Vector2 scrollPosition;
[MenuItem ("Window/File Icon")]
@masa795
masa795 / FileIconTest.cs
Created May 20, 2013
AssetDatabase.GetCachedIconを使用してアイコンとラベルを表示する。 AssetDatabase.GetAllAssetPaths()で取得するのでファイル数が多いと重くなるかも。 GUIContentを使用してTextFieldのラベルにアイコンを表示する。
View FileIconTest.cs
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class FileIconTest : EditorWindow {
Vector2 scrollPosition;
[MenuItem ("Window/File Icon")]
@masa795
masa795 / FileIconTest.cs
Created May 21, 2013
ボタンに画像を使う
View FileIconTest.cs
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class FileIconTest : EditorWindow {
Vector2 scrollPosition;
[MenuItem ("Window/File Icon")]
@masa795
masa795 / EditorApplication.ExecuteMenuItem.cs
Last active Dec 17, 2015
EditorApplication.ExecuteMenuItemサンプル
View EditorApplication.ExecuteMenuItem.cs
if (GUILayout.Button(new GUIContent("test"), GUILayout.Height(20)))
{
string menue = "Window/Asset Store";
menue = "NGUI/Panel Tool";
EditorApplication.ExecuteMenuItem(menue);
}
@masa795
masa795 / TrustAllCertificatePolicy.cs
Created Jul 7, 2013
CertificatePolicy を更新する
View TrustAllCertificatePolicy.cs
public class TrustAllCertificatePolicy : System.Net.ICertificatePolicy
{
public TrustAllCertificatePolicy() { }
public bool CheckValidationResult(System.Net.ServicePoint sp,
System.Security.Cryptography.X509Certificates.X509Certificate cert,
System.Net.WebRequest req,
int problem)
{
return true;