升级水插件

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

@@ -21,8 +21,13 @@ namespace WaveHarmonic.Crest.Internal
bool _IsFirstOnValidate = true;
internal bool _IsPrefabStageInstance;
private protected virtual bool CanRunInEditMode => true;
private protected virtual void Awake()
{
// Prevents allocations.
useGUILayout = false;
// When copy and pasting from one scene to another, destroy instance objects as
// they will have bad state.
foreach (var generated in transform.GetComponentsInChildren<ManagedGameObject>(includeInactive: true))
@@ -37,7 +42,7 @@ namespace WaveHarmonic.Crest.Internal
/// <summary>
/// Start method. Must be called if overriden.
/// </summary>
protected virtual void Start()
private protected virtual void Start()
{
if (Application.isPlaying && !(bool)s_ExecuteValidators.Invoke(null, new object[] { this }))
{
@@ -63,6 +68,11 @@ namespace WaveHarmonic.Crest.Internal
return;
}
if (!CanRunInEditMode)
{
return;
}
if (_IsFirstOnValidate)
{
var attribute = Helpers.GetCustomAttribute<ExecuteDuringEditMode>(GetType());