升级水插件

This commit is contained in:
2026-01-08 22:30:55 +08:00
parent febff82d24
commit ca68084264
415 changed files with 18138 additions and 7134 deletions

View File

@@ -1,4 +1,4 @@
// Crest Water System
// Crest Water System
// Copyright © 2024 Wave Harmonic. All rights reserved.
using UnityEditor;
@@ -11,17 +11,19 @@ namespace WaveHarmonic.Crest
sealed class Embedded : DecoratedProperty
{
internal EmbeddedAssetEditor _Editor;
readonly int _BottomMargin;
public int BottomMargin { get; private set; }
public string DefaultPropertyName { get; private set; }
public Embedded(int margin = 0)
public Embedded(int margin = 0, string defaultPropertyName = null)
{
_Editor = new();
_BottomMargin = margin;
BottomMargin = margin;
DefaultPropertyName = defaultPropertyName;
}
internal override void OnGUI(Rect position, SerializedProperty property, GUIContent label, DecoratedDrawer drawer)
{
_Editor.DrawEditorCombo(label, drawer, property, "asset", _BottomMargin);
_Editor.DrawEditorCombo(this, label, drawer, property, "asset");
}
internal override bool NeedsControlRectangle(SerializedProperty property) => false;