script-execute
Installation
SKILL.md
Script / Execute
Modes
- Full code mode (default,
isMethodBody=false): thecsharpCodeargument must define a complete class with a static method (no top-level statements). - Body-only mode (
isMethodBody=true): provide only the method body statements. The tool auto-generates the usings, class, and method header.
Passing Unity objects as parameters
Unity objects (GameObject, Component, etc.) can be passed as parameters using their Ref types (GameObjectRef, ComponentRef, etc.) or directly by type:
UnityEngine.GameObject— resolves an actual GameObject from value{"instanceID": N},{"name": "..."}, or{"path": "..."}.UnityEngine.Component(or any component subtype) — resolves from{"instanceID": N}.AIGD.GameObjectRef— passes aGameObjectRefPOCO directly; the method body callsgoRef.FindGameObject()to resolve it.AIGD.ComponentRef— passes aComponentRefPOCO.AIGD.ObjectRef— passes a baseObjectRefPOCO.