Class AchievementWizardViewDefaults
Decides what CreateAchievementSettingsWindow's "Create view" toggle starts out as, given the view id the run would author and what is already on disk at that path.
Inherited Members
Namespace: Serenity.Achievements.Infrastructure.Editor.Builder
Assembly: Serenity.UnityAchievements.Infrastructure.Editor.dll
Syntax
public static class AchievementWizardViewDefaults
Remarks
Its own type rather than a private method on the window for one reason: it encodes the rerun rule that actually bites. AchievementSettingsValidator refuses an occupied view path outright, so a second wizard run over a configuration that already has its listing would open on a toggle whose only possible outcome is a blocking error. Answering that question here keeps it testable without IMGUI, the same split the creator and its validator already use.
Methods
ShouldOfferViewCreation(string, string, Func<string, bool>)
Whether the wizard should start with view creation switched ON.
Declaration
public static bool ShouldOfferViewCreation(string viewId, string viewAssetPath, Func<string, bool> assetPathIsOccupied)
Parameters
| Type | Name | Description |
|---|---|---|
| string | viewId | The id the view definition would carry. Blank means there is nothing to name it. |
| string | viewAssetPath | The path the view definition would be written to. |
| Func<string, bool> | assetPathIsOccupied | Answers whether something already sits at a path — the seam that
keeps this decision free of |
Returns
| Type | Description |
|---|---|
| bool | False when the id is blank or the path is taken; true otherwise. |