Public API
Scry, assembly Scry; choice providers in namespace Scry.Editor, assembly Scry.Editor.Answer attributes
AnswerAttribute
abstract class ScryBase 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 : AnswerAttributeSets 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 : LayoutAs the code declares them: regions as bands, headers and spacing where the code puts them. Written [Scry.Layout.AsWritten].
Layout.SortedAttribute
sealed attr : LayoutGrouped 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 : AnswerAttributeSets 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 : StyleThe control inferred from the code. Written [Scry.Style.Scry].
Style.UnityAttribute
sealed attr : StyleUnity's own drawing, with the user's drawers and attributes. Written [Scry.Style.Unity].
Visibility
abstract attr Scry : AnswerAttributeSets 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 : VisibilityShown, and editable wherever the code can write it. Written [Scry.Visibility.Shown].
Visibility.ReadOnlyAttribute
sealed attr : VisibilityShown, 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 : VisibilityLeft out of the inspector. The search still finds it, faded. Written [Scry.Visibility.Hidden].
EffectIntendedAttribute
sealed attr Scry : AnswerAttributeStates 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 : AnswerAttributeTurns 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.EditorSupplies 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.EditorWhere 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. |