plantilla base para movimiento básico
This commit is contained in:
Robii Aragon
2026-02-05 05:07:55 -08:00
parent ed7b223c04
commit fd87a6ffd5
14441 changed files with 13711084 additions and 20 deletions

View File

@@ -0,0 +1,56 @@
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
[CustomEditor (typeof(CustomizableToolbarSettings))]
public class CustomizableToolbarSettingsInspector : Editor
{
private SerializedProperty m_property;
private ReorderableList m_reorderableList;
SerializedProperty numberOfColumns;
SerializedProperty windowsHeight;
void OnEnable ()
{
m_property = serializedObject.FindProperty ("m_list");
m_reorderableList = new ReorderableList (serializedObject, m_property) {
elementHeight = 120,
drawElementCallback = OnDrawElement
};
numberOfColumns = serializedObject.FindProperty ("numberOfColumns");
windowsHeight = serializedObject.FindProperty ("windowsHeight");
}
private void OnDrawElement (Rect rect, int index, bool isActive, bool isFocused)
{
var element = m_property.GetArrayElementAtIndex (index);
rect.height -= 4;
rect.y += 2;
EditorGUI.PropertyField (rect, element);
}
public override void OnInspectorGUI ()
{
serializedObject.Update ();
EditorGUILayout.PropertyField (numberOfColumns);
EditorGUILayout.PropertyField (windowsHeight);
EditorGUILayout.Space ();
if (GUILayout.Button (new GUIContent ("Update Values"))) {
CustomizableToolbar.updateToolBarValues ();
}
EditorGUILayout.Space ();
EditorGUILayout.Space ();
m_reorderableList.DoLayoutList ();
serializedObject.ApplyModifiedProperties ();
}
}