Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Unity Gameplay Mechanics Development Agent

    1

    Design and implement maintainable, physics-ready C# gameplay mechanics for Unity projects.

    $9.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Unity Gameplay Mechanics Development Agent

    Unity Gameplay Mechanics Development Agent

    Example session with this skill installed

    Create a C# double-jump mechanic for a 2D platformer using Rigidbody2D and the new Input System. Include state handling for the jump count and inspector variables.

    • Read your context and instructions
    • Compiled the unity gameplay mechanics

    I have designed a decoupled double-jump mechanic. It separates input detection from physics execution to ensure frame-rate independence and clean state transitions.

    Double Jump Mechanic Implementation

    using UnityEngine;
    using UnityEngine.InputSystem;
    
    [RequireComponent(typeof(Rigidbody2D))]
    public class DoubleJumpController : MonoBehaviour
    {
        [Header("Movement Settings")]
        [SerializeField] private float _jumpForce = 12f;
        [SerializeField] private int _maxJumps = 2;
        
        [Header("Detection")]
        [SerializeField] private Transform _groundCheck;
        [SerializeField] private float _groundCheckRadius = 0.2f;
        [SerializeField] private LayerMask _groundLayer;
    
        private Rigidbody2D _rb;
        private int _jumpCount;
        private bool _isGrounded;
        private bool _jumpRequested;
    
        private void Awake()
        {
            _rb = GetComponent<Rigidbody2D>();
            if (_groundCheck == null) Debug.LogError($"{name}: GroundCheck Transform missing!");
        }
    
        public void OnJump(InputAction.CallbackContext context)
        {
            if (context.started) _jumpRequested = true;
        }
    
        private void Update()
        {
            _isGrounded = Physics2D.OverlapCircle(_groundCheck.position, _groundCheckRadius, _groundLayer);
            
            if (_isGrounded && _rb.linearVelocity.y <= 0)
            {
                _jumpCount = 0;
            }
        }
    
        private void FixedUpdate()
        {
            if (_jumpRequested)
            {
                ExecuteJump();
            }
        }
    
        private void ExecuteJump()
        {
            if (_isGrounded || _jumpCount < _maxJumps)
            {
                // Reset vertical velocity for consistent jump height
                _rb.linearVelocity = new Vector2(_rb.linearVelocity.x, 0);
                _rb.AddForce(Vector2.up * _jumpForce, ForceMode2D.Impulse);
                _jumpCount++;
            }
            _jumpRequested = false;
        }
    }
    

    Unity Setup Instructions

    1. Attach DoubleJumpController to your Player GameObject.
    2. Create an empty child named "GroundCheck" and position it at the player's feet.
    3. Assign the GroundCheck child to the script's _groundCheck slot.
    4. Set the Ground Layer mask to match your environment's layer.
    5. In your PlayerInput component, link the Jump action to the OnJump method.

    Test Checklist

    • Confirm jump height remains identical at 30fps vs 120fps.
    • Verify jump count resets only when touching the ground layer.
    • Test jumping against a ceiling to ensure velocity reset doesn't cause clipping.
    • Validate behavior when _maxJumps is set to 1 (disables double jump).

    Next steps

    • Implement a Coyote Time buffer for more forgiving platforming.
    • Add an OnJump event hook to trigger particle effects or animations.
    • Create a JumpData ScriptableObject to store forces for different character classes.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Unity gameplay development is prone to monolithic scripts, physics glitches, and tightly coupled code that breaks when your project grows. This skill acts as a senior gameplay engineering partner to design and implement maintainable C# mechanics. It prioritizes decoupled architecture, inspector-driven configuration, and rigorous validation steps.

    What it does

    • Design mechanics from movement and combat to inventory and AI state machines.
    • Implement C# scripts using serialized fields, cached references, and optimized lifecycle methods.
    • Define architectures using composable MonoBehaviours, ScriptableObject configurations, and event-driven interfaces.
    • Provide integration guides for Animator parameters, Input System mappings, and prefab wiring.
    • Generate test plans covering boundary values, collision edge cases, and frame-rate independence.

    How it works

    1. Define behavior by specifying the actor, state transitions, and success/failure conditions.
    2. Analyze context to align with your existing scripts, naming conventions, and input setup.
    3. Architect and code the logic using physics-safe movement and decoupled event flows.
    4. Setup and validate using documented inspector settings and specific test checklists.

    Frameworks & tools

    C# for Unity, Unity Engine API, Input System package, Physics/Physics2D, and ScriptableObject architecture.

    Why this beats prompting it yourself

    Generic prompts often produce monolithic scripts that mix input and physics, leading to "jittery" movement and hard-to-debug states. This skill enforces strict separation of concerns and Unity best practices like caching references and avoiding per-frame allocations.

    Use cases

    • Building a frame-independent character controller with jumping and dashing logic.
    • Implementing a generic damage and health system with status effect hooks.
    • Creating a decoupled inventory system using ScriptableObject data containers.
    • Developing an FSM-based enemy AI that reacts to player proximity and health.

    Known limitations

    Does not perform actual profiling or compilation. Requires manual setup of networking packages for multiplayer features.

    Requires manual asset creation. Does not compile or profile code. Networking implementation is package-neutral unless a specific library is provided.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 7 days ago

    Permissions

    No special permissions declared or detected

    Listed7 days ago

    What's inside

    Frequently Asked Questions

    This skill prevents 'spaghetti code' by enforcing decoupled architecture, using ScriptableObjects for data, and ensuring physics logic is frame-rate independent, which avoids common issues like jittery movement or monolithic scripts.

    The skill is optimized for modern Unity standards, fully supporting the new Input System package and both 2D and 3D physics engines for C# development.

    While it generates high-quality, physics-ready C# code, it cannot directly compile scripts or run the Unity Profiler; you will need to paste the generated code into your IDE and perform final performance passes.

    Yes, the agent is designed to analyze your existing project context, including naming conventions and current class structures, to ensure new mechanics integrate seamlessly without breaking existing logic.

    You receive specialized logic for designing, coding, and documenting mechanics, including C# scripts, inspector setup guides, and specific test plans for validating physics and state transitions.

    New in Game Development