PropertyWindow 기능 추가

This commit is contained in:
logonkhi
2025-09-25 16:31:52 +09:00
parent 4c87f14f14
commit 4dc92b31e9
109 changed files with 41726 additions and 3169 deletions

View File

@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UVC.UI.Tooltip;
@@ -13,17 +14,29 @@ public class PropertyWindowSample : MonoBehaviour
PropertyWindow.Instance.LoadProperties(new List<IPropertyItem>
{
//new StringProperty("prop1", "String Property", "Initial Value")
//{
// Description = "This is a sample string property.",
// Tooltip = "Enter a string value here.",
// IsReadOnly = true
//}
new StringProperty("prop1", "String Property", "Initial Value")
{
Description = "This is a sample string property.",
Tooltip = "Enter a string value here.",
IsReadOnly = true
},
new IntProperty("prop2", "Int Property", 42, true)
{
Description = "This is a sample integer property.",
Tooltip = "Enter an integer value here.",
IsReadOnly = false
IsReadOnly = true
},
new IntRangeProperty("prop2_range", "Int Range Property", new Tuple<int, int>(0, 100))
{
Description = "This is a sample integer range property.",
Tooltip = "Select an integer value within the range here.",
IsReadOnly = true
},
new FloatRangeProperty("prop3_range", "Float Range Property", new Tuple<float, float>(0.0f, 1.0f))
{
Description = "This is a sample float range property.",
Tooltip = "Select a float value within the range here.",
IsReadOnly = true
},
new FloatProperty("prop3", "Float Property", 0.5f, true)
{
@@ -41,20 +54,75 @@ public class PropertyWindowSample : MonoBehaviour
{
Description = "This is a sample color property.",
Tooltip = "Select a color here.",
IsReadOnly = false
IsReadOnly = true
},
//new EnumProperty("prop6", "Enum Property", new List<string> { "Option 1", "Option 2", "Option 3" }, "Option 2")
new Vector2Property("prop6_vec2", "Vector2 Property", new Vector2(1, 2))
{
Description = "This is a sample Vector2 property.",
Tooltip = "Enter a Vector2 value here.",
IsReadOnly = true
},
new Vector3Property("prop6_vec3", "Vector3 Property", new Vector3(1, 2, 3))
{
Description = "This is a sample Vector3 property.",
Tooltip = "Enter a Vector3 value here.",
IsReadOnly = true
},
new DateProperty("prop6_date", "Date Property", System.DateTime.Now)
{
//Description = "This is a sample date property.",
Tooltip = "Select a date here.",
IsReadOnly = true
},
new DateTimeProperty("prop6_datetime", "DateTime Property", System.DateTime.Now)
{
Description = "This is a sample date-time property.",
Tooltip = "Select a date and time here.",
IsReadOnly = true
},
new DateRangeProperty("prop6_daterange", "Date Range Property", new Tuple<DateTime, DateTime>(DateTime.Now.AddDays(-7), DateTime.Now))
{
Description = "This is a sample date range property.",
Tooltip = "Select a date range here.",
IsReadOnly = true
},
new DateTimeRangeProperty("prop6_datetimerange", "DateTime Range Property", new Tuple<DateTime, DateTime>(DateTime.Now.AddHours(-1), DateTime.Now))
{
Description = "This is a sample date-time range property.",
Tooltip = "Select a date-time range here.",
IsReadOnly = true
},
new EnumProperty("prop6", "Enum Property", SampleEnum.Option1)
{
Description = "This is a sample enum property.",
Tooltip = "Select an option here.",
IsReadOnly = true
},
new ListProperty("prop7", "List Property", new List<string> { "Item1", "Item2", "Item3" }, "Item1")
{
Description = "This is a sample list property.",
Tooltip = "Manage the list items here.",
IsReadOnly = true
},
new RadioGroupProperty("prop8", "Radio Group Property", new List<string> { "Option1", "Option2", "Option3" }, "Option1")
{
Description = "This is a sample radio group property.",
Tooltip = "Select one option here.",
IsReadOnly = true
}
});
PropertyWindow.Instance.PropertyValueChanged += (sender, e) =>
{
Debug.Log($"Property '{e.PropertyId}' changed to: {e.NewValue}");
Debug.Log($"Property id:{e.PropertyId}, type:{e.PropertyType}, newValue: {e.NewValue}");
};
}
// Update is called once per frame
void Update()
enum SampleEnum
{
Option1,
Option2,
Option3
}
}

View File

@@ -460,6 +460,71 @@ RectTransform:
m_CorrespondingSourceObject: {fileID: 8065352563668446013, guid: 4b98d7ee8b805ff42be384e91f3bf8a4, type: 3}
m_PrefabInstance: {fileID: 512550209}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &676413027
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2909961743249083152, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: m_LocalPosition.x
value: 948.5436
objectReference: {fileID: 0}
- target: {fileID: 2909961743249083152, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: m_LocalPosition.y
value: 792.5279
objectReference: {fileID: 0}
- target: {fileID: 2909961743249083152, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2909961743249083152, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2909961743249083152, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2909961743249083152, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2909961743249083152, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2909961743249083152, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2909961743249083152, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2909961743249083152, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4705914027077067912, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: _cursorDataList.Array.data[12].hotspot.x
value: 16
objectReference: {fileID: 0}
- target: {fileID: 4705914027077067912, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: _cursorDataList.Array.data[12].hotspot.y
value: 16
objectReference: {fileID: 0}
- target: {fileID: 6976682146287246285, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
propertyPath: m_Name
value: CursorManager
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 42ed16ae6a9f96d4f9cd6c292a9edd85, type: 3}
--- !u!1 &1089297052
GameObject:
m_ObjectHideFlags: 0
@@ -692,3 +757,4 @@ SceneRoots:
- {fileID: 312817880}
- {fileID: 1089297056}
- {fileID: 122987901}
- {fileID: 676413027}