Attribute : AngleDisplayAs - Displays either a radian or euler float as the opposite
This commit is contained in:
parent
6e3bd4df70
commit
df1d2f6df1
8 changed files with 89 additions and 1 deletions
16
Runtime/Drawers/AngleDisplayAsAttribute.cs
Normal file
16
Runtime/Drawers/AngleDisplayAsAttribute.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using UnityEngine.Scripting;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class AngleDisplayAsAttribute : DrawerPropertyAttribute
|
||||
{
|
||||
public readonly EAngle type;
|
||||
|
||||
public AngleDisplayAsAttribute(EAngle type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Runtime/Drawers/AngleDisplayAsAttribute.cs.meta
Normal file
3
Runtime/Drawers/AngleDisplayAsAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 888ba1cbaa514c0fb72484e2f2d00ef3
|
||||
timeCreated: 1767540551
|
||||
10
Runtime/Enums/EAngle.cs
Normal file
10
Runtime/Enums/EAngle.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
public enum EAngle
|
||||
{
|
||||
Euler,
|
||||
Radian
|
||||
}
|
||||
}
|
||||
3
Runtime/Enums/EAngle.cs.meta
Normal file
3
Runtime/Enums/EAngle.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1812098cc5214e5c9b21c53535ee4a57
|
||||
timeCreated: 1767540585
|
||||
Loading…
Add table
Add a link
Reference in a new issue