Class UnityAchievementDefinitionEditor
Custom inspector for UnityAchievementDefinition: the authored fields, what the unlock condition actually demands in one line, every finding the shared authoring rules have about this achievement, and a Play Mode unlock preview.
Namespace: Serenity.Achievements.Infrastructure.Editor
Assembly: Serenity.UnityAchievements.Infrastructure.Editor.dll
Syntax
public class UnityAchievementDefinitionEditor : FoundationEditor<UnityAchievementDefinition>
Remarks
The condition, the findings and the preview are drawn by AchievementAuthoringSectionGui, the same collaborator the Achievements Studio's detail pane draws them with, so the two tools cannot drift into showing an author different things about the same achievement. The default field for the condition is suppressed through TryDrawCustomValueField(SerializedProperty) so the tree is drawn once, in its own section.
When the project-wide check is worth re-running is AchievementAuthoringReviewCache's question, not this inspector's.
Constructors
UnityAchievementDefinitionEditor()
Declaration
public UnityAchievementDefinitionEditor()
Properties
WizardShortcut
Declaration
protected override FoundationEditorWizardShortcut WizardShortcut { get; }
Property Value
| Type | Description |
|---|---|
| FoundationEditorWizardShortcut |
Methods
OnDisable()
Stops listening for project changes when this inspector goes away, so a closed editor does not leave a dead handler on a global event.
Declaration
public void OnDisable()
OnEnable()
Declaration
public override void OnEnable()
OnInspectorGUI()
Declaration
public override void OnInspectorGUI()
TryDrawCustomValueField(SerializedProperty)
Claims the condition property without drawing it: it is drawn further down as a tree, and letting Serenity.Global.Infrastructure.Settings.Editor.FoundationEditor`1.DrawSerializedFields also draw Unity's raw managed-reference field for it would give an author two different ways to edit one tree.
Declaration
protected override bool TryDrawCustomValueField(SerializedProperty property)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedProperty | property | The serialized property being iterated. |
Returns
| Type | Description |
|---|---|
| bool | True for the condition, false for everything else. |