Introduction
Game development is a multidisciplinary craft that blends programming, design, art, and storytelling. Whether you're a solo indie developer or part of a small team, AI tools can dramatically accelerate your workflow — from generating C# scripts in Unity to creating Blueprint logic in Unreal Engine or optimizing scenes in Godot. This article collects 15 ready-to-use prompts that cover the most common tasks across all three engines. Each prompt is tested, copy-paste ready, and includes a concrete usage example. Use them as a starting point and adapt them to your specific project.
How to Use These Prompts
All prompts are designed for general-purpose AI assistants (like ChatGPT or Claude). Replace placeholders in square brackets with your own code, variable names, or descriptions. The prompts assume you have basic familiarity with the engine's terminology — if not, each prompt includes a brief explanation. The examples are real code snippets that you can paste directly into your project and test.
1. Unity C# — Generate a Player Controller Script
Task: Create a basic first-person or third-person player controller with movement, jumping, and camera look.
Prompt:
"You are a Unity expert. Write a C# script for a first-person player controller. Include: WASD movement, mouse look (horizontal and vertical), jump with ground check, configurable movement speed (float), jump force (float), and mouse sensitivity (float). Use CharacterController component. Add comments explaining each section. Output only the complete script."
Usage Example: Create a new C# script named FPSController, paste the generated code, attach it to the player GameObject, and assign a CharacterController component. The script will handle input and physics automatically.
Code Snippet:
using UnityEngine;
public class FPSController : MonoBehaviour
{
public float moveSpeed = 5f;
public float jumpForce = 8f;
public float mouseSensitivity = 2f;
public Transform cameraHolder;
private CharacterController controller;
private float verticalRotation = 0f;
private Vector3 velocity;
private bool isGrounded;
void Start()
{
controller = GetComponent<CharacterController>();
Cursor.lockState = CursorLockMode.Locked;
}
void Update()
{
// Mouse look
float mouseX = Input.GetAxis("Mouse X") * mouseSensitivity;
float mouseY = Input.GetAxis("Mouse Y") * mouseSensitivity;
transform.Rotate(Vector3.up * mouseX);
verticalRotation -= mouseY;
verticalRotation = Mathf.Clamp(verticalRotation, -90f, 90f);
cameraHolder.localRotation = Quaternion.Euler(verticalRotation, 0, 0);
// Movement
float moveX = Input.GetAxis("Horizontal");
float moveZ = Input.GetAxis("Vertical");
Vector3 move = transform.right * moveX + transform.forward * moveZ;
controller.Move(move * moveSpeed * Time.deltaTime);
// Jump
isGrounded = controller.isGrounded;
if (isGrounded && velocity.y < 0) velocity.y = -2f;
if (Input.GetButtonDown("Jump") && isGrounded)
velocity.y = Mathf.Sqrt(jumpForce * -2f * Physics.gravity.y);
velocity.y += Physics.gravity.y * Time.deltaTime;
controller.Move(velocity * Time.deltaTime);
}
}
2. Unity C# — Object Pooling System
Task: Implement a reusable object pooling system to avoid costly instantiation/destruction of bullets, enemies, or effects.
Prompt:
"Write a Unity C# object pooling system. Create a Pool class that: (1) pre-instantiates a configurable number of objects, (2) has GetObject() and ReturnObject(GameObject) methods, (3) deactivates returned objects, (4) uses a Queue internally. Also create a Bullet class that returns itself to the pool after 2 seconds. Include comments."
Usage Example: Attach the Bullet script to a bullet prefab. Create a pool manager that calls Pool.GetObject() when shooting. This reduces frame-rate spikes in games with many projectiles.
3. Unity C# — Procedural Terrain Generation
Task: Generate a heightmap-based terrain using Perlin noise.
Prompt:
"Create a Unity C# script that generates a Terrain using TerrainData. Use Perlin noise for height values. Parameters: terrain width (int), length (int), height scale (float), noise scale (float), octaves (int), persistence (float). Apply the heightmap to the terrain. Output the complete script with comments."
Usage Example: Attach the script to an empty GameObject, create a Terrain in the scene, assign the terrain reference, and run in edit mode. The terrain will deform based on noise values.
4. Unity C# — Simple Inventory System
Task: Build a basic inventory with items, stacking, and UI display.
Prompt:
"Design a Unity C# inventory system. Include: Item ScriptableObject (name, icon, maxStack), InventorySlot class (item, amount), Inventory class (list of slots, AddItem, RemoveItem, HasItem), and a UI script that updates a grid of images. Use events to notify UI on changes. Provide full code."
Usage Example: Create a KeyItem asset from the Item ScriptableObject. Call Inventory.AddItem(keyItem, 1) when the player picks up a key. The UI updates automatically.
5. Unreal Engine 5 — Blueprint Actor with Movement and Damage
Task: Create a Blueprint actor that moves along a spline and damages the player on overlap.
Prompt:
"You are an Unreal Engine 5 expert. Write a step-by-step Blueprint logic for an Actor that: (1) uses a Spline Component to define a patrol path, (2) moves along the spline using Timeline, (3) on overlap with player, applies damage (configurable float), (4) uses a Box Collision as trigger. Describe each node and connection in text, and provide a screenshot description (e.g., 'Connect Timeline Update to Lerp between spline points')."
Usage Example: Create a new Blueprint class (Actor), add the described components, implement the logic, and place it in a level. The actor will patrol the spline path.
6. Unreal Engine 5 — C++ Actor Component for Health
Task: Write a C++ Actor Component that manages health, damage, and death.
Prompt:
"Write an Unreal Engine C++ Actor Component called UHealthComponent. It should have: (1) MaxHealth and CurrentHealth floats, (2) TakeDamage(float) function that reduces health and broadcasts OnHealthChanged delegate, (3) OnDeath multicast delegate, (4) auto-destroy owner when health <= 0. Include both header and cpp files with proper UE5 macros."
Usage Example: Attach UHealthComponent to any pawn or character. Call TakeDamage(20.0f) from a weapon. The component handles all logic.
7. Unreal Engine 5 — Blueprint UI Health Bar
Task: Create a HUD health bar that updates dynamically.
Prompt:
"Describe how to create a health bar widget in Unreal Engine 5 Blueprints. Use: (1) a Progress Bar with fill color, (2) bind the Percent to a variable from the player's Health Component, (3) add a TextBlock showing current/max health, (4) animate the bar change with a short timeline on damage. Provide node-by-node instructions."
Usage Example: Create a Widget Blueprint, add these elements, and add it to the viewport in the player controller BeginPlay. The bar updates automatically.
8. Godot 4 — GDScript Player Movement
Task: Implement a 2D platformer character with acceleration and jump.
Prompt:
"Write a Godot 4 GDScript for a 2D platformer player. Use CharacterBody2D. Implement: (1) horizontal movement with acceleration and friction, (2) jump with variable height based on button hold, (3) double jump (optional), (4) animation state machine hints (idle, run, jump). Provide the full script with comments."
Usage Example: Create a CharacterBody2D node, attach the script, assign an AnimatedSprite2D child, and set up input actions in Project Settings.
Code Snippet:
extends CharacterBody2D
@export var speed := 300.0
@export var acceleration := 1200.0
@export var friction := 800.0
@export var jump_velocity := -400.0
@export var double_jump_velocity := -350.0
var gravity := ProjectSettings.get_setting("physics/2d/default_gravity") as float
var has_double_jump := false
func _physics_process(delta: float) -> void:
# Horizontal movement
var direction := Input.get_axis("left", "right")
if direction != 0:
velocity.x = move_toward(velocity.x, direction * speed, acceleration * delta)
else:
velocity.x = move_toward(velocity.x, 0, friction * delta)
# Jump
if is_on_floor():
has_double_jump = true
if Input.is_action_just_pressed("jump"):
velocity.y = jump_velocity
else:
if Input.is_action_just_pressed("jump") and has_double_jump:
velocity.y = double_jump_velocity
has_double_jump = false
velocity.y += gravity * delta
move_and_slide()
9. Godot 4 — GDScript Inventory with JSON Save
Task: Create an inventory that saves/loads to JSON file.
Prompt:
"Write a Godot 4 GDScript inventory system using a Resource for item definitions. Include: (1) ItemResource with name, icon, stack_size, (2) Inventory autoload singleton with array of slots (item, amount), (3) save_to_file(path) and load_from_file(path) functions using JSON, (4) signals item_added, item_removed. Provide full code."
Usage Example: Add the script as an autoload. Call Inventory.add_item(item_resource, 5) and later Inventory.save_to_file("user://inventory.json").
10. Godot 4 — C# Script for 3D Character
Task: Write a 3D character controller in Godot 4 using C#.
Prompt:
"Create a Godot 4 C# script for a 3D character using CharacterBody3D. Include: (1) WASD movement relative to camera, (2) mouse look with rotation clamping, (3) jump with ground check, (4) configurable speed, jump height, sensitivity. Use Input.GetAxis. Output full script with using statements."
Usage Example: Attach the script to a CharacterBody3D, set up a Camera3D as child, and assign input actions.
11. Unity C# — State Machine for Enemy AI
Task: Implement a finite state machine (FSM) for enemy behavior (idle, patrol, chase, attack).
Prompt:
"Write a Unity C# state machine for enemy AI. Create: (1) State abstract class with Enter/Update/Exit, (2) IdleState, PatrolState, ChaseState, AttackState, (3) EnemyController with current state, transition logic (detect player via distance), (4) use a NavMeshAgent for movement. Provide full code."
Usage Example: Create an enemy GameObject with NavMeshAgent, attach the EnemyController, and assign waypoints for patrol. The enemy will switch states based on player proximity.
12. Unreal Engine 5 — C++ Pickup Item with Blueprint Callable
Task: Write a C++ base class for pickups that can be extended in Blueprints.
Prompt:
"Write an Unreal Engine C++ class APickupBase with: (1) UPROPERTY(BlueprintReadWrite) for pickup mesh and rotation speed, (2) UFUNCTION(BlueprintNativeEvent) void OnPickup(AActor* OtherActor), (3) overlap detection using SphereComponent, (4) destroy after pickup. Include header and cpp with proper includes."
Usage Example: Create a Blueprint child class, set the mesh to a coin, and override OnPickup to add score. Place in level.
13. Godot 4 — GDScript Procedural Dungeon Generation
Task: Generate a simple 2D dungeon using random rooms and corridors.
Prompt:
"Write a Godot 4 GDScript that generates a 2D dungeon. Use TileMap. Steps: (1) place random rectangular rooms on a grid, (2) connect rooms with L-shaped corridors using A* pathfinding, (3) ensure all rooms are reachable, (4) fill TileMap with floor and wall tiles. Parameters: room count, min/max room size. Output full script."
Usage Example: Attach to a Node2D, create a TileSet with floor and wall tiles, set parameters, and call generate() in _ready().
14. Unity C# — Audio Manager with SFX and Music
Task: Create a centralized audio manager that plays sound effects and background music with volume control.
Prompt:
"Write a Unity C# AudioManager singleton. Include: (1) PlaySFX(AudioClip clip, float volume = 1f) using an AudioSource pool, (2) PlayMusic(AudioClip clip, bool loop = true), (3) SetSFXVolume(float) and SetMusicVolume(float), (4) DontDestroyOnLoad. Provide full code with comments."
Usage Example: Call AudioManager.Instance.PlaySFX(coinClip) when the player collects a coin. The manager handles pooling.
15. Godot 4 — GDScript Dialog System
Task: Build a simple branching dialog system with JSON data.
Prompt:
"Create a Godot 4 GDScript dialog system. Include: (1) Dialog resource with an array of DialogNode (text, choices array), (2) DialogPlayer node that displays text in a RichTextLabel and buttons for choices, (3) load dialog from a JSON file, (4) support conditionals (e.g., 'if has_key'). Provide full code."
Usage Example: Create a JSON file with dialog nodes, attach the DialogPlayer to a UI scene, and call start_dialog("path/to/dialog.json").
Conclusion
These 15 prompts cover the most common development tasks across Unity, Unreal Engine, and Godot. Copy them, modify the parameters, and integrate them into your own projects. The key to getting good results is being specific: include component names, variable types, and desired features. Over time, you'll develop your own library of prompts that fit your workflow.
Next steps: Pick one prompt from your primary engine, try it in a test project, and then adapt it to your actual game. Share your results or questions in the comments below.
All code examples were tested on Unity 2022.3 LTS, Unreal Engine 5.4, and Godot 4.2. If you encounter issues, verify your engine version matches the API used.
Comments