Answer attributes

AnswerAttribute

abstract class Scry

Base of Scry's attributes: an answer given in the Inspector, written into the script so the team shares it. Every attribute exists in the editor only.

bool Force { get; set; }Makes the answer fixed: the Inspector shows a lock instead of the control that changes it. Unforced, the attribute only sets each user's default.

Layout

abstract attr Scry : AnswerAttribute

Sets how a type's members are laid out in Scry's Inspector, wherever they show: a component's or an asset's Inspector, or a value of the type folded open. On: classes and structs. Write one of its values. Two values on one member or type are an error on its row, and [Scry.Layout.AsWritten] holds.

Layout.AsWrittenAttribute

sealed attr : Layout

As the code declares them: regions as bands, headers and spacing where the code puts them. Written [Scry.Layout.AsWritten].

Layout.SortedAttribute

sealed attr : Layout

Grouped by kind, for code whose own layout does not help: serialized fields, then other fields and properties, then events and methods, then static members, with no regions, headers or spacing. Within a group, members every build uses come first, then those that do nothing in a player build, then those that do nothing in a release build; within each, fields come before properties and events before methods, then source order. Written [Scry.Layout.Sorted].

Style

abstract attr Scry : AnswerAttribute

Sets the style of a serialized field. On a MonoBehaviour or ScriptableObject type, sets the style of its whole Inspector: Unity style shows Unity's own default inspector. On any other type, sets the style of every serialized field it declares, short of a field's own attribute or answer unless the type's is forced. On: fields, classes and structs. Write one of its values. Two values on one member or type are an error on its row, and [Scry.Style.Unity] holds.

Style.ScryAttribute

sealed attr : Style

The control inferred from the code. Written [Scry.Style.Scry].

Style.UnityAttribute

sealed attr : Style

Unity's own drawing, with the user's drawers and attributes. Written [Scry.Style.Unity].

Visibility

abstract attr Scry : AnswerAttribute

Sets whether a member shows in Scry's Inspector, and whether Scry may change anything through it. Without it, what code outside the type cannot use is read-only: a non-public field Unity does not serialize, a property whose getter or setter is not public, a non-public method or event. A serialized field is editable whatever its access. On: fields, properties, methods and events. Write one of its values. Two values on one member are an error on its row, and the first of Hidden, ReadOnly, Shown holds.

Visibility.ShownAttribute

sealed attr : Visibility

Shown, and editable wherever the code can write it. Written [Scry.Visibility.Shown].

Visibility.ReadOnlyAttribute

sealed attr : Visibility

Shown, not editable: its setter is never called, and a method runs or an event is raised only when Scry proves it changes nothing. Written [Scry.Visibility.ReadOnly].

Visibility.HiddenAttribute

sealed attr : Visibility

Left out of the inspector. The search still finds it, faded. Written [Scry.Visibility.Hidden].

EffectIntendedAttribute

sealed attr Scry : AnswerAttribute

States that the effects of a method or setter are intended, so Scry never asks before running it. On: methods and properties. Written [Scry.EffectIntended].

NotLiveAttribute

sealed attr Scry : AnswerAttribute

Turns off live updates for a getter, setter or method: a getter or a method shows its value on request, a setter applies on release or Enter. On: properties and methods. Written [Scry.NotLive].

Choice providers

IScryChoiceProvider

interface Scry.Editor

Supplies the valid values of a string argument, for a declaration's choices fact. Scry flags a value that is not among them. Reference the provider from a declaration file by its full type name. It needs a public parameterless constructor.

IEnumerable<string> GetChoices(ScryChoiceContext context)The valid values in this context.

ScryChoiceContext

readonly struct Scry.Editor

Where a choice provider is asked for its values.

ScryChoiceContext(Object inspectedObject, object receiver)Creates a context.
Object InspectedObject { get; }The object being inspected.
object Receiver { get; }The current value of the call's receiver when the receiver is a member of the inspected object, such as the Animator in animator.SetFloat(name, value); otherwise null.