logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SonyMotionGamepadSurfaceTests

    PlayMode tests proving Serenity.InputGateway.Infrastructure.Devices.Motion.DualSenseGamepadHIDWithMotion and Serenity.InputGateway.Infrastructure.Devices.Motion.DualShock4GamepadHIDWithMotion's IMotionCapableGamepad accessors are true one-line forwards to their shared Serenity.InputGateway.Infrastructure.Devices.Motion.SonyMotionGamepadSurface collaborator: writing a raw gyro sample through Input System and reading it back off each device's public property proves the surface resolved the right named controls (and, for LastMotionSampleTime, the right device) rather than the device reintroducing its own reading logic. Inheriting UnityEngine.InputSystem.InputTestFixture isolates and resets the input system per test.

    Inheritance
    object
    SonyMotionGamepadSurfaceTests
    Namespace: Serenity.InputGateway.Tests.Infrastructure.Devices.Motion
    Assembly: Tests.dll
    Syntax
    public sealed class SonyMotionGamepadSurfaceTests : InputTestFixture

    Constructors

    SonyMotionGamepadSurfaceTests()

    Declaration
    public SonyMotionGamepadSurfaceTests()

    Methods

    DualSense_GyroAxes_ForwardSharedSurfaceValues()

    Declaration
    public IEnumerator DualSense_GyroAxes_ForwardSharedSurfaceValues()
    Returns
    Type Description
    IEnumerator

    DualShock4_GyroAxes_ForwardSharedSurfaceValues()

    Declaration
    public IEnumerator DualShock4_GyroAxes_ForwardSharedSurfaceValues()
    Returns
    Type Description
    IEnumerator

    Setup()

    InputTestFixture resets the input system to a fresh manager per test, which drops this project's own GamepadMotionLayoutRegistration runtime registration along with it — so both layouts are re-registered here before each test can add one by type.

    Declaration
    public override void Setup()
    In this article
    © 2026 Serenity. All Rights Reserved