Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Input
      • AutoResolveChange
      • AutoResolveResult
      • BindingConflict
      • BindingStorageSettings
      • BindingStorageType
      • BridgeSettings
      • BufferedInput
      • ConfigActionEntry
      • ConfigActionGroup
      • ConfigBindingEntry
      • ConfigConflict
      • ConfigGroupExclusion
      • ConfigLayout
      • ConfigLayout.Builder
      • ConfigLayoutColumnDefinition
      • ConfigLayoutConflictScope
      • ConfigLayoutDefinition
      • ConfigLayoutExclusionDefinition
      • ConfigLayoutGroupDefinition
      • ConfigLayoutGroupMode
      • ConfigLayoutMemberReference
      • ConfigLayoutValidationMessage
      • ConfigLayoutValidationSeverity
      • ConfigSchemeGroup
      • ContextConflictScope
      • ContextValidationMessage
      • ContextValidationSeverity
      • ControlScheme
      • ControlSchemeChangedEvent
      • ControlSchemeManager
      • ControlSchemeType
      • GamepadButton
      • GamepadType
      • IBindingStorage
      • IControlSchemeManager
      • IInputActionManager
      • IInputBindingManager
      • IInputBridgeManager
      • IInputBufferManager
      • IInputConflictScope
      • IInputContextManager
      • IInputControlAliasResolver
      • IInputHintsManager
      • IInputListener
      • IInputRebindabilityProvider
      • IScyllaInputBridge
      • IdentityControlAliasResolver
      • InputActionCanceledEvent
      • InputActionManager
      • InputActionMapNode
      • InputActionMetadata
      • InputActionNode
      • InputActionPerformedEvent
      • InputActionStartedEvent
      • InputActionsDocument
      • InputActionsDocumentIO
      • InputActionsJSONKeys
      • InputAnnotation
      • InputAssetInfo
      • InputBindingGroups
      • InputBindingManager
      • InputBindingMetadata
      • InputBindingNode
      • InputBindingsLoadedEvent
      • InputBindingsSavedEvent
      • InputBridgeManager
      • InputBridgeQueryMode
      • InputBufferConsumedEvent
      • InputBufferManager
      • InputBufferedEvent
      • InputCodegenSettings
      • InputCompositeUtil
      • InputConflictEngine
      • InputConflictPair
      • InputConflictPolicy
      • InputConflictReason
      • InputConflictRecord
      • InputConflictRecordBuilder
      • InputConflictResolution
      • InputConflictSet
      • InputContext
      • InputContextChangedEvent
      • InputContextDefinition
      • InputContextExclusivity
      • InputContextManager
      • InputContextPoppedEvent
      • InputContextPushedEvent
      • InputControlAliasEntry
      • InputControlAliasResolver
      • InputControlAliasScope
      • InputControlPathUtil
      • InputControlSchemeNode
      • InputDeviceChangedEvent
      • InputDeviceConnectedEvent
      • InputDeviceDisconnectedEvent
      • InputDeviceType
      • InputDeviceUtil
      • InputDisabledEvent
      • InputEnabledEvent
      • InputEventType
      • InputHint
      • InputHintChangedEvent
      • InputHintsManager
      • InputIconSet
      • InputIconSet.IconMapping
      • InputIconSetChangedEvent
      • InputInteractionKind
      • InputInteractionResolver
      • InputInteractionSignature
      • InputJSONMember
      • InputJSONNode
      • InputJSONNodeReader
      • InputJSONNodeType
      • InputJSONNodeWriter
      • InputLoggingSettings
      • InputMapMetadata
      • InputMetadataRebindabilityProvider
      • InputMetadataReconciler
      • InputMetadataRecordKind
      • InputModifierMetadataUtil
      • InputOrphanRecord
      • InputRebindCancelledEvent
      • InputRebindCompletedEvent
      • InputRebindManager
      • InputRebindOperation
      • InputRebindStartedEvent
      • InputRebindUtils
      • InputRebindability
      • InputReconcileAction
      • InputReconcileOptions
      • InputReconcileReport
      • InputReconcileReport.Entry
      • InputSchemeDeviceNode
      • InputSchemeMetadata
      • JSONFileBindingStorage
      • ManagedRebindCancelledEvent
      • ManagedRebindCompletedEvent
      • ManagedRebindDataRefreshedEvent
      • ManagedRebindStartedEvent
      • PlayerPrefsBindingStorage
      • RebindMode
      • RebindSettings
      • ScyllaInput
      • ScyllaInput.Meta
      • ScyllaInputAction
      • ScyllaInputActionMap
      • ScyllaInputActionsMetadata
      • ScyllaInputActionsMetadataMigrator
      • ScyllaInputBinding
      • ScyllaInputConfiguration
      • ScyllaInputContextConfiguration
      • ScyllaKey
      • ScyllaKeyConverter
      • ScyllaModifier
      • UnityInputSystemBridge
    • Scylla.Input.Editor
      • DeviceStatusWidget
      • IconMappingDrawer
      • InputIconSetEditor
      • ScyllaInputActionsMetadataEditor
      • ScyllaInputConfigurationEditor
      • ScyllaInputContextConfigurationEditor
      • ScyllaInputDependencyProvider
      • ScyllaInputEditor
      • ScyllaInputGameProfile
      • ScyllaInputGameProfiles
      • ScyllaInputMenuItems
      • ScyllaInputWizard

    Class InputCodegenSettings

    Where and how the constants file for an action asset is generated.

    Inheritance
    object
    InputCodegenSettings
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Scylla.Input
    Assembly: ScyllaInput.dll
    Syntax
    [Serializable]
    public class InputCodegenSettings
    Remarks

    Every field is declarative user intent. Nothing derived is stored here, and in particular no content hash of the generated file: whether the file on disk is current is answered by comparing bytes against it, which cannot go stale the way a recorded hash does when the file is deleted, hand-edited, or resolved from the wrong side of a merge.

    The three path-shaped fields are stored empty and resolved at use time by Resolve(string, string), so an action asset that is renamed or moved keeps generating sensibly instead of writing to a path that no longer means anything. A field the user has filled in is always honored as written.

    Settings live on the sidecar rather than in editor preferences so they travel with the asset. A colleague who clones the repository regenerates to the same path, in the same namespace, without configuring anything.

    Fields

    ClassName

    Name of the generated type, or empty to derive one from the asset name.

    Declaration
    [Tooltip("Name of the generated type. Leave empty to derive one from the action asset's name.")]
    public string ClassName
    Field Value
    Type Description
    string

    DEFAULT_CLASS_NAME

    Type name used when no class name has been chosen.

    Declaration
    public const string DEFAULT_CLASS_NAME = "InputActionIDs"
    Field Value
    Type Description
    string
    Remarks

    Fixed rather than derived from the asset name. A project generally generates one constants file and refers to it from everywhere, so a name that tracked whichever asset produced it would only make the call sites harder to read, and would change under a project that renamed its actions asset. It also removes a whole class of invalid name: an asset called "2D Platformer" cannot produce a type starting with a digit if the type name never comes from the asset.

    DEFAULT_NAMESPACE

    Namespace used when neither the settings nor the project name one.

    Declaration
    public const string DEFAULT_NAMESPACE = "Game.Input"
    Field Value
    Type Description
    string
    Remarks

    A project that configures a root namespace still wins: this is the last resort, and it exists because Unity leaves the root namespace empty by default, which used to leave a new asset unable to generate until someone typed a namespace by hand.

    EmitAccessors

    Whether to emit the optional convenience accessors alongside the constants.

    Declaration
    [Tooltip("Emit convenience accessors alongside the constants.")]
    public bool EmitAccessors
    Field Value
    Type Description
    bool

    GenerateOnSave

    Whether saving the asset regenerates the constants file.

    Declaration
    [Tooltip("Regenerate on save. Off by default: writing a C# file triggers a domain reload, which drops the editor's undo history.")]
    public bool GenerateOnSave
    Field Value
    Type Description
    bool
    Remarks

    Off by default. Writing a C# file under Assets compiles, and compiling reloads the domain, which drops the editor's undo history. Generation is therefore opt-in, and only a save that actually changes an identifier pays the cost, because an unchanged generate writes nothing at all.

    IsEnabled

    Whether constants generation is configured for this asset at all.

    Declaration
    [Tooltip("Whether constants generation is configured for this asset.")]
    public bool IsEnabled
    Field Value
    Type Description
    bool

    Namespace

    Namespace for the generated type, or empty to take the project's root namespace.

    Declaration
    [Tooltip("Namespace for the generated type. Leave empty to use the project's root namespace.")]
    public string Namespace
    Field Value
    Type Description
    string

    OutputPath

    Project-relative output path, or empty to resolve one beside the action asset.

    Declaration
    [Tooltip("Project-relative path of the generated file. Leave empty to write beside the action asset.")]
    public string OutputPath
    Field Value
    Type Description
    string

    Methods

    DeriveOutputPath(string, string)

    Builds the default output path for an action asset, beside the asset itself.

    Declaration
    public static string DeriveOutputPath(string actionAssetPath, string className)
    Parameters
    Type Name Description
    string actionAssetPath

    Project-relative path of the action asset.

    string className

    The resolved type name.

    Returns
    Type Description
    string

    A project-relative path ending in .cs, or empty when the asset path is unusable.

    Resolve(string, string)

    Fills in whatever the author left blank, without writing anything back.

    Declaration
    public InputCodegenSettings Resolve(string actionAssetPath, string rootNamespace)
    Parameters
    Type Name Description
    string actionAssetPath

    Project-relative path of the action asset.

    string rootNamespace

    The project's root namespace, or null when it has none.

    Returns
    Type Description
    InputCodegenSettings

    A copy with every blank field resolved where a default exists.

    Remarks

    One resolution point for the whole feature, so the panel's placeholder text and the generator's output cannot disagree about where a file will land. The namespace has no derived fallback on purpose: emitting into the global namespace is a poor thing to hand somebody, so an unresolvable namespace comes back empty and the caller refuses to generate until one is supplied.

    See Also

    ScyllaInputActionsMetadata
    In this article
    Back to top Scylla Framework - Input Module API Documentation