Added the project.

This commit is contained in:
Robert Cupisz
2016-11-01 13:25:56 +01:00
parent 93760b331c
commit 947b6de3a5
137 changed files with 33276 additions and 0 deletions

View File

@ -0,0 +1,23 @@
using UnityEngine;
using UnityEditor;
[CustomPropertyDrawer (typeof (MinValueAttribute))]
public class MinValueDrawer : PropertyDrawer {
public override void OnGUI (Rect position, SerializedProperty property, GUIContent label)
{
if (property.propertyType != SerializedPropertyType.Float && property.propertyType != SerializedPropertyType.Integer)
{
EditorGUI.LabelField (position, label.text, "Use MinValue with float or int.");
return;
}
EditorGUI.PropertyField(position, property, label);
if (GUI.changed)
{
MinValueAttribute minValue = attribute as MinValueAttribute;
property.floatValue = Mathf.Max(property.floatValue, minValue.min);
}
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: af909d555c4764145b02bd06b0c9646d
timeCreated: 1447329696
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: