Skip to content

Instantly share code, notes, and snippets.

View SleepingFoxNEKO's full-sized avatar

Yamada Wataru SleepingFoxNEKO

  • Japan
View GitHub Profile
// L2DModelMatrixを使うサンプル
void OnRenderObject()
{
//キャンパスサイズはlive2DModelから取得できる
var height = live2DModel.getCanvasHeight();
var width = live2DModel.getCanvasWidth();
// 初期化の時にキャンパスサイズが必要
// 縦横比は維持したまま、移動やサイズの変更ができる。
using UnityEngine;
using UnityEditor;
using System.Collections;
[CustomPropertyDrawer (typeof(FolderPathAttribute))]
class FolderPathDrawer : PropertyDrawer {
// Draw the property inside the given rect
public override void OnGUI (Rect position , SerializedProperty property, GUIContent label) {