Quick Start
Develop and test your game's API calls in Unity without waiting for backend services.
π₯ Watch Firstβ
Prefer video? Watch this quick tutorial:
Or follow the written guide below β
The Problem You're Solving β
You're building a Unity game that talks to a backend server. You need login systems, player profiles, leaderboards, shop/inventory, multiplayer matchmakingβbut development is painful.
See yourself in these situations?
| Scenario | Without API Mocking Toolkit | With API Mocking Toolkit |
|---|---|---|
| Backend team is behind |
|
|
| Testing edge cases |
|
|
| Working offline |
|
|
| Capturing real API data |
|
|
Sound familiar? API Mocking Toolkit solves all of this.
Run your entire game without a backend API server. Test any scenario. Capture real API responses with one click. Work completely offline.
How it works:
Your game talks to the API Mocking Toolkit, which can route calls to:
- Real Backend β Production or staging servers
- QA Server β Testing environment
- Localhost β Local development server
- Mock Responses β Instant success/error responses with custom status codes, latency, and data

β One tool, four ways to test β Switch between real servers and mocks instantly
What You'll Learnβ
In this quick guide, you'll:
- β Install API Mocking Toolkit
- β Run the demo scene (see it working instantly!)
- β Create your first mock API endpoint
Make your game work without a backend.
No live backend required during development. Your game talks to mocked APIs running entirely inside Unity.
Installation (Unity Asset Store)β
- Open the Unity Asset Store
- Search for "API Mocking Toolkit" or open the Asset Store page directly in your browser.
- Click
Import - Import all files
Requirements:
- Unity 2021.3 or later
- No external dependencies
Run the Demo Scene β
Follow these steps to run the included demo scene and verify that the toolkit is installed correctly:
| Step 1 β Open the demo scene | In Unity, open What you'll see:
|
| Step 2 β Press Play | Hit the Play button. The scene runs. |
| Step 3 β Click "Get Users" | What happens:
Example request/response: |
| Step 4 β Click "Get Posts" multiple times | Watch this:
This is Response Strategies β API Mocking Toolkit cycles through different responses automatically, which is useful for testing pagination and repeated calls. |
What just happened?
You just ran a fully functional game that makes API calls through ApiClient, receives responses, and handles data without depending on a live backend.
- β No backend team required during this stage of development
- β No network connection required while using only mocked APIs
- β Fast, predictable responses
- β Complete control over the data you test with
How It Works β
You might be wondering: "How does this work?"
Let's peek under the hood. Open DemoController.cs:
public async void OnGetUsersClicked()
{
// This is normal Unity HTTP code - nothing special!
var response = await ApiClient.GetAsync(
"https://jsonplaceholder.typicode.com/users"
);
// Display the response in the UI
DisplayResponse(response);
}
That's it. Standard API call. No magic.
Behind the scenes:
-
You configured an endpoint (already done in the demo scene)
- URL:
https://jsonplaceholder.typicode.com/users - Mock response:
[{user data...}]
- URL:
-
API Mocking Toolkit intercepts
- Sees the URL matches your config
- Returns your mock data instead of hitting the real server
-
Your code gets the response
- Doesn't know it's mocked
- Works exactly like a real API
The key idea: your game code doesn't change.
Same code works with:
- β Mocked data (when API Mocking Toolkit is active)
- β Real backend (when you turn mocking off)
No if (testing) checks. No special test code. Just works.
Create Your First Endpoint (Your Turn!) β
Now for the real power: Mock YOUR game's API.
Imagine you're building an RPG. You need a player profile API, but the backend isn't ready yet.
Let's build it anyway:
| Step 1 β Open the API Mocking Toolkit window | In Unity, open |
| Step 2 β Create an endpoint | Click "+ Endpoint". In the form, set:
|
| Step 3 β Add a mock response | In the Response section, set Status Code to |
| Step 4 β Enable Offline Mode | Toggle Offline Mode ON at the top of the window so the game uses mocked responses instead of the real backend. |
| Step 5 β Test it | Create a test script: |
Run it! You'll see your mock data in the console.
What's Next?β
π Congratulations! You've:
- Installed API Mocking Toolkit
- Run the demo scene
- Created your first endpoint
Continue learning:
- Core Features (Deep Dive) β Response strategies, offline mode, environments, sessions, OpenAPI, error simulation, and more
- Guides β Workflows and real-world scenarios
- API Reference β Full API surface and code examples
Watch the video again later:
- Use it as a visual cheatsheet when you come back to the tool
Troubleshootingβ
Nothing happening?
- Make sure Offline Mode is ON
- Check the URL matches exactly (case-sensitive)
- Look for errors in the Console
Demo scene not working?
- Make sure "Demo Scene Collection" is selected in dropdown
- Re-import the Samples folder from Package Manager
Need help?