Introduce background spawning with parallax effect (#86)

Co-authored-by: Michal Pikulski <michal.a.pikulski@gmail.com>
Reviewed-on: #86
This commit is contained in:
2025-12-17 22:08:23 +00:00
parent 4ce61ee756
commit b669ea1a55
85 changed files with 6029 additions and 1439 deletions

View File

@@ -181,28 +181,38 @@ namespace AppleHills.Core.Settings.Editor
return;
}
SerializedObject serializedObj = serializedSettingsObjects[typeof(T).Name];
serializedObj.Update();
EditorGUILayout.Space(10);
// Draw all properties
SerializedProperty property = serializedObj.GetIterator();
bool enterChildren = true;
while (property.NextVisible(enterChildren))
// Use CreateEditor to respect custom editors (like AirplaneSettingsEditor)
UnityEditor.Editor editor = UnityEditor.Editor.CreateEditor(settings);
if (editor != null)
{
enterChildren = false;
// Skip the script field
if (property.name == "m_Script") continue;
EditorGUILayout.PropertyField(property, true);
editor.OnInspectorGUI();
DestroyImmediate(editor);
}
// Apply changes
if (serializedObj.ApplyModifiedProperties())
else
{
EditorUtility.SetDirty(settings);
// Fallback to default drawing if no custom editor exists
SerializedObject serializedObj = serializedSettingsObjects[typeof(T).Name];
serializedObj.Update();
SerializedProperty property = serializedObj.GetIterator();
bool enterChildren = true;
while (property.NextVisible(enterChildren))
{
enterChildren = false;
// Skip the script field
if (property.name == "m_Script") continue;
EditorGUILayout.PropertyField(property, true);
}
// Apply changes
if (serializedObj.ApplyModifiedProperties())
{
EditorUtility.SetDirty(settings);
}
}
}