升级水插件
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user