EditorSettingAttribute
- Namespace: Turian
- Source File: EditorSettingAttribute.cs
Declares a page of editor settings when applied to a class, or titles and describes one option when applied to a member of that class. The studio instantiates an annotated class once, restores its persisted values and shows its public members as a page in the Settings panel; a member with no attribute of its own is still shown, titled from its name.
Example
` [EditorSetting("My Tools/Formatting", Description = "How generated files are laid out.")] public sealed class FormattingSettings { [EditorSetting("Indent Width", Description = "Spaces per indent level.")] public int IndentWidth { get; set; } = 4; } `
Properties
Path
(string) = path: The category path (on a class), or the display label (on a member).
Description
(string) { get; set } = "": A sentence shown under the page title, or under an option's own title.
Order
(int) { get; set }: Sort order among sibling pages; ties fall back to the title. Meaningful only on a class.
Workspace
(bool) { get; set }: Stores the page with the project rather than with the user, so everyone who opens the project gets the same values. Off by default: a preference follows the person, not the work. Meaningful only on a class.