diff --git a/Editor/Passes/Cabinet/WardrobePass.cs b/Editor/Passes/Cabinet/WardrobePass.cs
index 1edd4187..a4327b1a 100644
--- a/Editor/Passes/Cabinet/WardrobePass.cs
+++ b/Editor/Passes/Cabinet/WardrobePass.cs
@@ -76,7 +76,7 @@ private static bool LookUpForWardrobe(Transform root, out DTWardrobe wardrobe)
return false;
}
- private static bool LookUpForOutfit(Transform root, out IOutfit outfit)
+ private static bool LookUpForOutfit(Transform root, out IOutfitComponent outfit)
{
while (root != null)
{
@@ -212,7 +212,7 @@ private static void ComposeOutfitItems(Transform parent)
}
}
- private static void CreateOutfitSubMenu(Context ctx, DTWardrobe wardrobeComp, Transform outfitTransform, IOutfit outfit)
+ private static void CreateOutfitSubMenu(Context ctx, DTWardrobe wardrobeComp, Transform outfitTransform, IOutfitComponent outfit)
{
if (wardrobeComp.UseAsMenuGroup)
{
@@ -238,7 +238,7 @@ private static void CreateOutfitSubMenu(Context ctx, DTWardrobe wardrobeComp, Tr
}
}
- private static void CreateOutfitEnableItem(Context ctx, DTWardrobe wardrobeComp, DTParameterSlot slot, Transform outfitTransform, IOutfit outfit, float mappedVal)
+ private static void CreateOutfitEnableItem(Context ctx, DTWardrobe wardrobeComp, DTParameterSlot slot, Transform outfitTransform, IOutfitComponent outfit, float mappedVal)
{
if (wardrobeComp.UseAsMenuGroup)
{
@@ -456,7 +456,7 @@ private static void ComposeOutfitEnableItems(Context ctx, DTParameterSlot slot,
if (LookUpForWardrobe(outfitEnableItem.transform, out var wardrobeComp) && !wardrobeComp.UseAsMenuGroup)
{
// look up for wardrobe. if found, check if not used as menu group
- IOutfit outfit;
+ IOutfitComponent outfit;
if (outfitEnableItem.TargetOutfit != null)
{
outfit = outfitEnableItem.TargetOutfit;
diff --git a/Runtime/Components/Cabinet/DTAlternateOutfit.cs b/Runtime/Components/Cabinet/DTAlternateOutfit.cs
index 7c5808ac..a068e9a1 100644
--- a/Runtime/Components/Cabinet/DTAlternateOutfit.cs
+++ b/Runtime/Components/Cabinet/DTAlternateOutfit.cs
@@ -18,8 +18,9 @@
namespace Chocopoi.DressingTools.Components.Cabinet
{
+ [DisallowMultipleComponent]
[AddComponentMenu("")]
- internal class DTAlternateOutfit : DTBaseComponent, IOutfit
+ internal class DTAlternateOutfit : DTBaseComponent, IOutfitComponent
{
public string Name { get => name; set => name = value; }
public Texture2D Icon { get => m_Icon; set => m_Icon = value; }
diff --git a/Runtime/Components/Cabinet/DTBaseOutfit.cs b/Runtime/Components/Cabinet/DTBaseOutfit.cs
index 226474da..b8753963 100644
--- a/Runtime/Components/Cabinet/DTBaseOutfit.cs
+++ b/Runtime/Components/Cabinet/DTBaseOutfit.cs
@@ -20,8 +20,9 @@ namespace Chocopoi.DressingTools.Components.Cabinet
/// Base outfit component. This component stores items related to the base outfit.
/// It does not contain any toggles or property groups since they are supposingly applied beforehand.
///
+ [DisallowMultipleComponent]
[AddComponentMenu("")]
- internal class DTBaseOutfit : DTBaseComponent, IOutfit
+ internal class DTBaseOutfit : DTBaseComponent, IOutfitComponent
{
public string Name => "Base";
public Texture2D Icon { get => m_Icon; set => m_Icon = value; }
diff --git a/Runtime/Components/Cabinet/DTOutfitGroup.cs b/Runtime/Components/Cabinet/DTOutfitGroup.cs
index 7a0611d9..c0982914 100644
--- a/Runtime/Components/Cabinet/DTOutfitGroup.cs
+++ b/Runtime/Components/Cabinet/DTOutfitGroup.cs
@@ -14,6 +14,7 @@
namespace Chocopoi.DressingTools.Components.Cabinet
{
+ [DisallowMultipleComponent]
[AddComponentMenu("")]
internal class DTOutfitGroup : DTBaseComponent
{
diff --git a/Runtime/Components/Cabinet/DTWardrobe.cs b/Runtime/Components/Cabinet/DTWardrobe.cs
index 69b20626..cde7e794 100644
--- a/Runtime/Components/Cabinet/DTWardrobe.cs
+++ b/Runtime/Components/Cabinet/DTWardrobe.cs
@@ -17,6 +17,7 @@
namespace Chocopoi.DressingTools.Components.Cabinet
{
+ [DisallowMultipleComponent]
[AddComponentMenu("")]
internal class DTWardrobe : DTBaseComponent
{
diff --git a/Runtime/Components/Cabinet/IOutfit.cs b/Runtime/Components/Cabinet/IOutfitComponent.cs
similarity index 96%
rename from Runtime/Components/Cabinet/IOutfit.cs
rename to Runtime/Components/Cabinet/IOutfitComponent.cs
index 44930471..fd18a84b 100644
--- a/Runtime/Components/Cabinet/IOutfit.cs
+++ b/Runtime/Components/Cabinet/IOutfitComponent.cs
@@ -16,7 +16,7 @@
namespace Chocopoi.DressingTools.Components.Cabinet
{
- internal interface IOutfit
+ internal interface IOutfitComponent
{
Transform RootTransform { get; }
string Name { get; }
diff --git a/Runtime/Components/Cabinet/IOutfit.cs.meta b/Runtime/Components/Cabinet/IOutfitComponent.cs.meta
similarity index 100%
rename from Runtime/Components/Cabinet/IOutfit.cs.meta
rename to Runtime/Components/Cabinet/IOutfitComponent.cs.meta
diff --git a/Runtime/Components/OneConf/DTCabinet.cs b/Runtime/Components/OneConf/DTCabinet.cs
index 12f9a83f..187ad72d 100644
--- a/Runtime/Components/OneConf/DTCabinet.cs
+++ b/Runtime/Components/OneConf/DTCabinet.cs
@@ -19,6 +19,7 @@ namespace Chocopoi.DressingTools.Components.OneConf
///
/// DressingTools cabinet component. Used for storing cabinet settings and apply trigger.
///
+ [DisallowMultipleComponent]
[AddComponentMenu("DressingTools/DT Cabinet")]
[DefaultExecutionOrder(-19999)]
[ExecuteInEditMode]
diff --git a/Runtime/Components/OneConf/DTWearable.cs b/Runtime/Components/OneConf/DTWearable.cs
index 4c74f474..31c91ec0 100644
--- a/Runtime/Components/OneConf/DTWearable.cs
+++ b/Runtime/Components/OneConf/DTWearable.cs
@@ -19,6 +19,7 @@ namespace Chocopoi.DressingTools.Components.OneConf
///
/// DressingTools wearable component. Used for storing wearable configuration.
///
+ [DisallowMultipleComponent]
internal class DTWearable : DTBaseComponent
{
///