Update
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace DA_Assets.FCU.Attributes
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Field, AllowMultiple = false)]
|
||||
public class FObjectAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// The object's name in Figma.
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
|
||||
public FObjectAttribute(string name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: af80620cfa3a6394b8b14198dc5f84d4
|
||||
@@ -0,0 +1,41 @@
|
||||
using DA_Assets.DAI;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DA_Assets.FCU
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
|
||||
public class FcuInspectorProperty : CustomInspectorProperty
|
||||
{
|
||||
public FcuInspectorProperty(
|
||||
ComponentType type,
|
||||
FcuLocKey label,
|
||||
FcuLocKey tooltip,
|
||||
float minValue = 0,
|
||||
float maxValue = 1) : base(type, new GUIContent(GetLabelFromEnum(label), GetLabelFromEnum(tooltip)), minValue, maxValue)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private static string GetLabelFromEnum(FcuLocKey value)
|
||||
{
|
||||
return value.Localize();
|
||||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false)]
|
||||
public class FcuPropertyHeader : PropertyHeader
|
||||
{
|
||||
public FcuPropertyHeader(
|
||||
FcuLocKey label,
|
||||
FcuLocKey tooltip) : base(new GUIContent(GetLabelFromEnum(label), GetLabelFromEnum(tooltip)))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private static string GetLabelFromEnum(FcuLocKey value)
|
||||
{
|
||||
return value.Localize();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c43b919dc8a35843b4a83a298c874a1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace DA_Assets.FCU.Attributes
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
|
||||
public sealed class PaintPriorityAttribute : Attribute
|
||||
{
|
||||
public int Priority { get; }
|
||||
|
||||
public PaintPriorityAttribute(int priority)
|
||||
{
|
||||
Priority = priority;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa800b8053a516044b19668e55e95eff
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user