𓅹 kitasenju design blog 𓅸

humans are imperfect

Editor拡張

inspectorに独自の型を表示する

インスペクタに独自の型 using UnityEngine; using System.Collections; using System.Collections.Generic; [System.Serializable] public class HogeClass { public string name; public int index2; public int index3; } public class UITest : MonoBeha…

Inspector上のボタンを横に並べる

align buttons horizonally on Inspector 8個x3行、かいた for(int j=0;j<3;j++){ EditorGUILayout.BeginHorizontal(); for(int i=j*8;i<8*(j+1);i++){ if (GUILayout.Button(""+i,GUILayout.Width(30))){ exampleScript.SendMessage ("SetEffect", i, SendM…

Header attributeに複数行書く時 orderをかく

must add order number to write multi line texts [Header("●ARBackgroundからテクスチャを作るクラス",order = 1)] [Space(10,order = 2)] [Header("ARFoundation機能への参照",order = 3)]

ツールバーから画面キャプチャするスクリプト

using System.IO; using UnityEditor; using UnityEngine; [ExecuteInEditMode] public class CapturePNG { private static int _index = 0; [MenuItem("Tools/Screen Capture")] public static void Capture() { var str = System.DateTime.Now.ToString("y…

インスペクターにボタンを作る

how to make a button on inspector https://kan-kikuchi.hatenablog.com/entry/CustomEditor_Button ExampleScript.cs using UnityEngine; [ExecuteInEditMode] //エディター再生してない時、動くように? 場合によって使う public class ExampleScript : M…

editor window

qiita.com https://caitsithware.com/wordpress/archives/1377 scriptable 【Unity】ScriptableObjectってなんなん? って時に読む記事【解説】 │ エクスプラボ bezier www.asset-sale.net

Bake vertices to PNG with compute shader

compute shaderをつかって頂点をベイクする using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; #if UNITY_EDITOR using UnityEditor; using System.IO; #endif public class MeshVertBaker2 : MonoBehavi…

Texture2Dに頂点をベイクする

bake vertices to texture2d using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; #if UNITY_EDITOR using UnityEditor; using System.IO; #endif public class MeshVertBaker1 : MonoBehaviour { [Seriali…

〠FOOTER〠