Installed Surge, fixed compile errors, moved a bunch of external stuff into folder
This commit is contained in:
82
Assets/External/Pixelplacement/Surge/DisplayObject/Editor/DisplayObjectEditor.cs
vendored
Normal file
82
Assets/External/Pixelplacement/Surge/DisplayObject/Editor/DisplayObjectEditor.cs
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
/// <summary>
|
||||
/// SURGE FRAMEWORK
|
||||
/// Author: Bob Berkebile
|
||||
/// Email: bobb@pixelplacement.com
|
||||
///
|
||||
/// Custom inspector for the DisplayObject class.
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using UnityEditor;
|
||||
|
||||
namespace Pixelplacement
|
||||
{
|
||||
[CustomEditor (typeof (DisplayObject), true)]
|
||||
public class DisplayObjectEditor : UnityEditor.Editor
|
||||
{
|
||||
//Private Variables:
|
||||
DisplayObject _target;
|
||||
|
||||
//Init:
|
||||
void OnEnable()
|
||||
{
|
||||
_target = target as DisplayObject;
|
||||
}
|
||||
|
||||
//Inspector GUI:
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
DrawDefaultInspector ();
|
||||
|
||||
GUILayout.BeginHorizontal ();
|
||||
DrawSoloButton ();
|
||||
DrawShowButton ();
|
||||
DrawHideButton ();
|
||||
DrawHideAllButton ();
|
||||
GUILayout.EndHorizontal ();
|
||||
}
|
||||
|
||||
//GUI Draw Methods:
|
||||
void DrawShowButton ()
|
||||
{
|
||||
GUI.color = Color.yellow;
|
||||
if (GUILayout.Button ("Show"))
|
||||
{
|
||||
Undo.RegisterCompleteObjectUndo (_target, "Show DisplayObject");
|
||||
_target.SetActive (true);
|
||||
}
|
||||
}
|
||||
|
||||
void DrawSoloButton ()
|
||||
{
|
||||
GUI.color = Color.green;
|
||||
if (GUILayout.Button ("Solo"))
|
||||
{
|
||||
Undo.RegisterCompleteObjectUndo (_target, "Solo DisplayObject");
|
||||
_target.Solo ();
|
||||
}
|
||||
}
|
||||
|
||||
void DrawHideButton ()
|
||||
{
|
||||
GUI.color = new Color (1, 0.5f, 0, 1);
|
||||
if (GUILayout.Button ("Hide"))
|
||||
{
|
||||
Undo.RegisterCompleteObjectUndo (_target, "Hide DisplayObject");
|
||||
_target.SetActive (false);
|
||||
}
|
||||
}
|
||||
|
||||
void DrawHideAllButton ()
|
||||
{
|
||||
GUI.color = Color.red;
|
||||
if (GUILayout.Button ("Hide All"))
|
||||
{
|
||||
Undo.RegisterCompleteObjectUndo (_target, "Hide all DisplayObjects");
|
||||
_target.HideAll ();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
19
Assets/External/Pixelplacement/Surge/DisplayObject/Editor/DisplayObjectEditor.cs.meta
vendored
Normal file
19
Assets/External/Pixelplacement/Surge/DisplayObject/Editor/DisplayObjectEditor.cs.meta
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1494a48c2c33dfc499b2bfdd0ce24f5b
|
||||
timeCreated: 1479232771
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 107312
|
||||
packageName: Surge
|
||||
packageVersion: 1.0.48
|
||||
assetPath: Assets/Pixelplacement/Surge/DisplayObject/Editor/DisplayObjectEditor.cs
|
||||
uploadId: 467433
|
||||
Reference in New Issue
Block a user