Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Last active January 7, 2016 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/c80ad918efa21e26c77a to your computer and use it in GitHub Desktop.
Save tsubaki/c80ad918efa21e26c77a to your computer and use it in GitHub Desktop.
マテリアル拡張
using UnityEngine;
using System.Collections;
using UnityEditor;
public class ExampleShaderInspector : MaterialEditor {
// マテリアルへのアクセス
Material material{
get{
return (Material)target;
}
}
// Inspectorに表示される内容
public override void OnInspectorGUI ()
{
// マテリアルを閉じた時に非表示にする
if (isVisible == false ) { return; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment