- Home
- Skills
- Game Development
- Unity Gameplay Mechanics Development Agent
Works with the AI Agents you already use
Unity Gameplay Mechanics Development Agent
Design and implement maintainable, physics-ready C# gameplay mechanics for Unity projects.
$9.99
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
- Attach
DoubleJumpControllerto your Player GameObject. - Create an empty child named "GroundCheck" and position it at the player's feet.
- Assign the GroundCheck child to the script's
_groundCheckslot. - Set the
Ground Layermask to match your environment's layer. - In your
PlayerInputcomponent, link the Jump action to theOnJumpmethod.
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
_maxJumpsis set to 1 (disables double jump).
Next steps
- Implement a
Coyote Timebuffer for more forgiving platforming. - Add an
OnJumpevent hook to trigger particle effects or animations. - Create a
JumpDataScriptableObject 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
- Define behavior by specifying the actor, state transitions, and success/failure conditions.
- Analyze context to align with your existing scripts, naming conventions, and input setup.
- Architect and code the logic using physics-safe movement and decoupled event flows.
- 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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