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,9 @@
fileFormatVersion: 2
guid: 32a49e8d55dc4c848ae0d5a0aca3b357
folderAsset: yes
timeCreated: 1447329667
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

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:

View File

@ -0,0 +1,11 @@
using UnityEngine;
public class MinValueAttribute : PropertyAttribute
{
public float min;
public MinValueAttribute (float min)
{
this.min = min;
}
}

View File

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