1.1 KiB
1.1 KiB
Unity API Lookup (unity-api MCP)
Use the unity-api MCP tools to verify Unity API usage instead of guessing. Do not hallucinate signatures.
| When | Tool | Example |
|---|---|---|
| Unsure about a method's parameters or return type | get_method_signature |
get_method_signature("UnityEngine.Tilemaps.Tilemap.SetTile") |
Need the using directive for a type |
get_namespace |
get_namespace("SceneManager") |
| Want to see all members on a class | get_class_reference |
get_class_reference("InputAction") |
| Searching for an API by keyword | search_unity_api |
search_unity_api("async load scene") |
| Checking if an API is deprecated | get_deprecation_warnings |
get_deprecation_warnings("FindObjectOfType") |
Rules:
- Before writing a Unity API call you haven't used in this conversation, verify the signature with
get_method_signature - Before adding a
usingdirective, verify withget_namespaceif unsure - Covers: all UnityEngine/UnityEditor modules, Input System, Addressables, uGUI, TextMeshPro, AI Navigation, and Netcode
- Does NOT cover: DOTween, VContainer, Newtonsoft.Json (third-party assets)