logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class PlayerInputActionAssetCreator

    Creates a brand-new UnityEngine.InputSystem.InputActionAsset (.inputactions) on disk — the "Create New…" shortcut next to CreatePlayerInputWindow's Input Asset field, for a project that has none yet.

    Prefers copying the installed Input System package's own project-wide default template (a "Player" map plus a "UI" map with Navigate/Submit/Cancel — the same content "Assets ▸ Create ▸ Input Actions" and the Project Settings ▸ Input System Package "Create asset" button produce), so the created asset already matches what Unity itself ships. Falls back to Serenity.InputGateway.Installation.Editor.Builder.PlayerInputActionAssetCreator.BuildMinimalUiOnlyTemplateJson — a single "UI" map with just Navigate/Submit/Cancel, matching this wizard's own Definition step defaults — when that template is not present (an Input System package version without the project-wide actions feature).

    PlayerInputCreator never creates or retags the InputAsset reference itself — it is always an externally-authored asset the caller assigns. This type is the one place that DOES create one, so it registers the result as Addressable with PLAYER_INPUT, mirroring every asset PlayerInputCreator.ResolveOrCreateByIdInFolder<TSettings> creates for the same module.

    Inheritance
    object
    PlayerInputActionAssetCreator
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.InputGateway.Installation.Editor.Builder
    Assembly: Serenity.UnityPlayerInput.Installation.Editor.dll
    Syntax
    public static class PlayerInputActionAssetCreator

    Methods

    Create(string)

    Writes a new .inputactions asset at assetPath (an "Assets/..." project path), imports it, and retags it Addressable with PLAYER_INPUT.

    Declaration
    public static InputActionAsset Create(string assetPath)
    Parameters
    Type Name Description
    string assetPath
    Returns
    Type Description
    InputActionAsset
    In this article
    © 2026 Serenity. All Rights Reserved