Skip to content

Instantly share code, notes, and snippets.

@arknano
Created January 16, 2017 16:00
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 arknano/fa6ab7db4fa4c27686243dacee3b0acf to your computer and use it in GitHub Desktop.
Save arknano/fa6ab7db4fa4c27686243dacee3b0acf to your computer and use it in GitHub Desktop.
//This file must go in Assets/Editor to function!
using UnityEngine;
using System.Collections;
using UnityEditor;
[CustomEditor(typeof(SetVolumeAlpha))]
public class SetVolumeAlphaEditor : Editor
{
public override void OnInspectorGUI()
{
DrawDefaultInspector();
SetVolumeAlpha myScript = (SetVolumeAlpha)target;
if (GUILayout.Button("Set Alpha (Chunk Refresh required)"))
{
myScript.SetAlpha();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment