升级水插件
This commit is contained in:
@@ -84,6 +84,16 @@ namespace WaveHarmonic.Crest
|
||||
}
|
||||
}
|
||||
|
||||
[Conditional(Symbols.k_UnityEditor)]
|
||||
[AttributeUsage(AttributeTargets.Enum, AllowMultiple = false, Inherited = false)]
|
||||
sealed class GenerateDoc : Attribute
|
||||
{
|
||||
public GenerateDoc()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#if !UNITY_EDITOR
|
||||
|
||||
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
|
||||
@@ -102,12 +112,21 @@ namespace WaveHarmonic.Crest
|
||||
sealed class Disabled : Decorator { }
|
||||
|
||||
[Conditional(Symbols.k_UnityEditor)]
|
||||
sealed class AttachMaterialEditor : Decorator { }
|
||||
sealed class AttachMaterialEditor : Attribute
|
||||
{
|
||||
public AttachMaterialEditor(int order = 0) { }
|
||||
}
|
||||
|
||||
[Conditional(Symbols.k_UnityEditor)]
|
||||
sealed class InlineToggle : Decorator
|
||||
{
|
||||
public InlineToggle(bool fix = false) { }
|
||||
}
|
||||
|
||||
[Conditional(Symbols.k_UnityEditor)]
|
||||
sealed class Embedded : Decorator
|
||||
{
|
||||
public Embedded(int margin = 0) { }
|
||||
public Embedded(int margin = 0, string defaultPropertyName = null) { }
|
||||
}
|
||||
|
||||
[Conditional(Symbols.k_UnityEditor)]
|
||||
|
||||
@@ -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