1.9.0: Added support for attributes for drawing handles in the scene
This commit is contained in:
parent
81906d49dd
commit
5ce34bde70
48 changed files with 1354 additions and 8 deletions
14
Runtime/Enums/EAxis.cs
Normal file
14
Runtime/Enums/EAxis.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[Flags]
|
||||
public enum EAxis
|
||||
{
|
||||
None = 0,
|
||||
X = 1,
|
||||
Y = 2,
|
||||
Z = 4,
|
||||
All = X | Y | Z
|
||||
}
|
||||
}
|
||||
3
Runtime/Enums/EAxis.cs.meta
Normal file
3
Runtime/Enums/EAxis.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6cea1a74f79c4b4e98b10fe9b98a0cfe
|
||||
timeCreated: 1669408493
|
||||
12
Runtime/Enums/ELabelType.cs
Normal file
12
Runtime/Enums/ELabelType.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[Flags]
|
||||
public enum ELabelType
|
||||
{
|
||||
None = 0,
|
||||
Field = 1,
|
||||
Value = 2
|
||||
}
|
||||
}
|
||||
3
Runtime/Enums/ELabelType.cs.meta
Normal file
3
Runtime/Enums/ELabelType.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 00491187b70e400eb9bd403b49428b09
|
||||
timeCreated: 1669499298
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
Drawer,
|
||||
ValueModifier,
|
||||
AccessModifier,
|
||||
HandleDrawer,
|
||||
Validate
|
||||
}
|
||||
}
|
||||
7
Runtime/HandleDrawerPropertyAttribute.cs
Normal file
7
Runtime/HandleDrawerPropertyAttribute.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace Module.Inspector
|
||||
{
|
||||
public abstract class HandleDrawerPropertyAttribute : AbstractPropertyAttribute
|
||||
{
|
||||
public override EPropertyType Type => EPropertyType.HandleDrawer;
|
||||
}
|
||||
}
|
||||
3
Runtime/HandleDrawerPropertyAttribute.cs.meta
Normal file
3
Runtime/HandleDrawerPropertyAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f9cdb8b0deb04fde8fa9b56e03a6f8c8
|
||||
timeCreated: 1669408378
|
||||
3
Runtime/HandleDrawers.meta
Normal file
3
Runtime/HandleDrawers.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6f0c558105634558964c91d5d8e3c979
|
||||
timeCreated: 1669408405
|
||||
22
Runtime/HandleDrawers/BoxHandleAttribute.cs
Normal file
22
Runtime/HandleDrawers/BoxHandleAttribute.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class BoxHandleAttribute : HandleDrawerPropertyAttribute
|
||||
{
|
||||
public readonly string fieldPosition;
|
||||
public readonly string fieldRotation;
|
||||
public readonly Space space;
|
||||
|
||||
public BoxHandleAttribute(string fieldPosition = null,
|
||||
string fieldRotation = null,
|
||||
Space space = Space.World)
|
||||
{
|
||||
this.fieldPosition = fieldPosition;
|
||||
this.fieldRotation = fieldRotation;
|
||||
this.space = space;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Runtime/HandleDrawers/BoxHandleAttribute.cs.meta
Normal file
3
Runtime/HandleDrawers/BoxHandleAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b2966619dc0e480480c69602eb4d25f4
|
||||
timeCreated: 1669475646
|
||||
22
Runtime/HandleDrawers/CircleHandleAttribute.cs
Normal file
22
Runtime/HandleDrawers/CircleHandleAttribute.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class CircleHandleAttribute : HandleDrawerPropertyAttribute
|
||||
{
|
||||
public readonly string fieldPosition;
|
||||
public readonly string fieldRotation;
|
||||
public readonly Space space;
|
||||
|
||||
public CircleHandleAttribute(string fieldPosition = null,
|
||||
string fieldRotation = null,
|
||||
Space space = Space.World)
|
||||
{
|
||||
this.fieldPosition = fieldPosition;
|
||||
this.fieldRotation = fieldRotation;
|
||||
this.space = space;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Runtime/HandleDrawers/CircleHandleAttribute.cs.meta
Normal file
3
Runtime/HandleDrawers/CircleHandleAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ec1137ba9e1344398415c1874809f64b
|
||||
timeCreated: 1669475438
|
||||
22
Runtime/HandleDrawers/LabelHandleAttribute.cs
Normal file
22
Runtime/HandleDrawers/LabelHandleAttribute.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class LabelHandleAttribute : HandleDrawerPropertyAttribute
|
||||
{
|
||||
public readonly ELabelType type;
|
||||
public readonly string fieldPosition;
|
||||
public readonly Space space;
|
||||
|
||||
public LabelHandleAttribute(ELabelType type = ELabelType.Value,
|
||||
string fieldPosition = null,
|
||||
Space space = Space.World)
|
||||
{
|
||||
this.type = type;
|
||||
this.fieldPosition = fieldPosition;
|
||||
this.space = space;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Runtime/HandleDrawers/LabelHandleAttribute.cs.meta
Normal file
3
Runtime/HandleDrawers/LabelHandleAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b04dcda9e8db4bfcab1d02ca1a7904f4
|
||||
timeCreated: 1669475765
|
||||
18
Runtime/HandleDrawers/PositionHandleAttribute.cs
Normal file
18
Runtime/HandleDrawers/PositionHandleAttribute.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class PositionHandleAttribute : HandleDrawerPropertyAttribute
|
||||
{
|
||||
public readonly Space space;
|
||||
public readonly EAxis axiis;
|
||||
|
||||
public PositionHandleAttribute(Space space, EAxis axiis)
|
||||
{
|
||||
this.space = space;
|
||||
this.axiis = axiis;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Runtime/HandleDrawers/PositionHandleAttribute.cs.meta
Normal file
3
Runtime/HandleDrawers/PositionHandleAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6ee82f8e6bfe42cd96c84a910b716d7a
|
||||
timeCreated: 1669408436
|
||||
22
Runtime/HandleDrawers/RectangleHandleAttribute.cs
Normal file
22
Runtime/HandleDrawers/RectangleHandleAttribute.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class RectangleHandleAttribute : HandleDrawerPropertyAttribute
|
||||
{
|
||||
public readonly string fieldPosition;
|
||||
public readonly string fieldRotation;
|
||||
public readonly Space space;
|
||||
|
||||
public RectangleHandleAttribute(string fieldPosition = null,
|
||||
string fieldRotation = null,
|
||||
Space space = Space.World)
|
||||
{
|
||||
this.fieldPosition = fieldPosition;
|
||||
this.fieldRotation = fieldRotation;
|
||||
this.space = space;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Runtime/HandleDrawers/RectangleHandleAttribute.cs.meta
Normal file
3
Runtime/HandleDrawers/RectangleHandleAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c0b65d01ae7944ababe1c42a9497192c
|
||||
timeCreated: 1669475700
|
||||
18
Runtime/HandleDrawers/RotationHandleAttribute.cs
Normal file
18
Runtime/HandleDrawers/RotationHandleAttribute.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class RotationHandleAttribute : HandleDrawerPropertyAttribute
|
||||
{
|
||||
public readonly string fieldPosition;
|
||||
public readonly Space space;
|
||||
|
||||
public RotationHandleAttribute(string fieldPosition = null, Space space = Space.World)
|
||||
{
|
||||
this.fieldPosition = fieldPosition;
|
||||
this.space = space;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Runtime/HandleDrawers/RotationHandleAttribute.cs.meta
Normal file
3
Runtime/HandleDrawers/RotationHandleAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0a51649ba7d643b59166944db5f2dc95
|
||||
timeCreated: 1669475570
|
||||
22
Runtime/HandleDrawers/SphereHandleAttribute.cs
Normal file
22
Runtime/HandleDrawers/SphereHandleAttribute.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.Inspector
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
|
||||
public sealed class SphereHandleAttribute : HandleDrawerPropertyAttribute
|
||||
{
|
||||
public readonly string fieldPosition;
|
||||
public readonly string fieldRotation;
|
||||
public readonly Space space;
|
||||
|
||||
public SphereHandleAttribute(string fieldPosition = null,
|
||||
string fieldRotation = null,
|
||||
Space space = Space.World)
|
||||
{
|
||||
this.fieldPosition = fieldPosition;
|
||||
this.fieldRotation = fieldRotation;
|
||||
this.space = space;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Runtime/HandleDrawers/SphereHandleAttribute.cs.meta
Normal file
3
Runtime/HandleDrawers/SphereHandleAttribute.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4ec43235833844159723030f304ac03b
|
||||
timeCreated: 1669475530
|
||||
Loading…
Add table
Add a link
Reference in a new issue