Skip to content

Instantly share code, notes, and snippets.

masa795

Block or report user

Report or block masa795

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@masa795
masa795 / DefauldFolderWindow.cs
Created May 13, 2013
Unityで使用しているフォルダとかのパス一覧Window
View DefauldFolderWindow.cs
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System;
using UnityEditorInternal;
using System.IO;
public class DefauldFolderWindow : EditorWindow {
@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 / UnityTextures.cs
Created Jun 17, 2013
Unityが持っているアイコンを表示する。 Unityのバージョンによってはパスが使えなくなるかもしれないので使用時は注意。
View UnityTextures.cs
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
//Unity 4.1.5
public class UnityTextures : EditorWindow
{
@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;
@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 設定
You can’t perform that action at this time.