Files
aibis-dream/Assets/Shapes/Scripts/Editor/Components/ConeEditor.cs
T
2025-05-07 15:07:44 +08:00

29 lines
827 B
C#

using System.Linq;
using UnityEditor;
// Shapes © Freya Holmér - https://twitter.com/FreyaHolmer/
// Website & Documentation - https://acegikmo.com/shapes/
namespace Shapes {
[CustomEditor( typeof(Cone) )]
[CanEditMultipleObjects]
public class ConeEditor : ShapeRendererEditor {
SerializedProperty propRadius = null;
SerializedProperty propLength = null;
SerializedProperty propSizeSpace = null;
SerializedProperty propFillCap = null;
public override void OnInspectorGUI() {
base.BeginProperties();
ShapesUI.FloatInSpaceField( propRadius, propSizeSpace );
ShapesUI.FloatInSpaceField( propLength, propSizeSpace, spaceEnabled: false );
EditorGUILayout.PropertyField( propFillCap );
if( base.EndProperties() )
foreach( Cone cone in targets.Cast<Cone>() )
cone.UpdateMesh();
}
}
}