unity-agentic-tools 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -12
- package/dist/cli.js +6843 -13203
- package/dist/doc-indexer-cli.js +5 -42
- package/dist/index.js +906 -381
- package/native/unity-file-tools.darwin-arm64.node +0 -0
- package/native/unity-file-tools.darwin-x64.node +0 -0
- package/native/unity-file-tools.linux-x64-gnu.node +0 -0
- package/native/unity-file-tools.win32-x64-msvc.node +0 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -12,31 +12,103 @@ Fast CLI for Unity scene, prefab, and asset files. Extracts GameObject hierarchi
|
|
|
12
12
|
npm install -g unity-agentic-tools
|
|
13
13
|
unity-agentic-tools read scene MyScene.unity
|
|
14
14
|
unity-agentic-tools read gameobject MyScene.unity "Main Camera" -p
|
|
15
|
-
unity-agentic-tools
|
|
15
|
+
unity-agentic-tools editor invoke UnityAgenticTools.Update.Objects Transform --args '["Assets/Scenes/Main.unity","Main Camera","0,5,-10"]'
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Command Surface
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
`read scene` | `read gameobject` | `read asset` | `read scriptable-object` | `read material` | `read dependencies` | `read dependents` | `read unused` | `read settings` | `read build` | `read overrides` | `read component` | `read reference` | `read script` | `read scripts` | `read log` | `read meta` | `read animation` | `read animator` | `read manifest` | `read input-actions`
|
|
20
|
+
Unsafe scene and prefab graph mutations no longer live under top-level `create` / `update`. Use the editor bridge instead:
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
```bash
|
|
23
|
+
unity-agentic-tools editor invoke UnityAgenticTools.Create.Scenes GameObject --args '["Assets/Scenes/Main.unity","EnemyRoot","Gameplay"]'
|
|
24
|
+
unity-agentic-tools editor invoke UnityAgenticTools.Create.Prefabs PrefabInstance --args '["Assets/Scenes/Boot.unity","Assets/Prefabs/AppRoot.prefab"]'
|
|
25
|
+
unity-agentic-tools editor invoke UnityAgenticTools.Update.Objects Component --args '["Assets/Scenes/Main.unity","Player","BoxCollider","0","m_IsTrigger","true"]'
|
|
26
|
+
unity-agentic-tools editor invoke UnityAgenticTools.Update.Serialized BatchComponents --args '["Assets/Scenes/Main.unity","[{\"gameObjectPath\":\"Player\",\"componentType\":\"BoxCollider\",\"componentIndex\":0,\"propertyPath\":\"m_IsTrigger\",\"value\":\"true\"}]"]'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Top-level CLI commands remain for file-safe asset and project mutations. `UnityAgenticTools.Create.*` / `UnityAgenticTools.Update.*` require a reachable live editor bridge; they do not fall back to handwritten YAML.
|
|
25
30
|
|
|
26
|
-
###
|
|
27
|
-
`
|
|
31
|
+
### Read (20)
|
|
32
|
+
`read scene` | `read gameobject` | `read asset` | `read scriptable-object` | `read material` | `read dependencies` | `read dependents` | `read unused` | `read settings` | `read build` | `read overrides` | `read component` | `read reference` | `read script` | `read scripts` | `read meta` | `read animation` | `read animator` | `read manifest` | `read input-actions`
|
|
28
33
|
|
|
29
|
-
###
|
|
30
|
-
|
|
34
|
+
### Create (0 top-level)
|
|
35
|
+
Creation is editor-only now. Use `unity-agentic-tools editor invoke UnityAgenticTools.Create.* ...`.
|
|
31
36
|
|
|
32
|
-
###
|
|
33
|
-
`
|
|
37
|
+
### Update (7 top-level)
|
|
38
|
+
`update scriptable-object` | `update settings` | `update layer` | `update material` | `update meta` | `update animation` | `update animator`
|
|
39
|
+
|
|
40
|
+
### Delete (6)
|
|
41
|
+
`delete gameobject` | `delete component` | `delete build` | `delete prefab` | `delete asset` | `delete package`
|
|
42
|
+
|
|
43
|
+
### Editor (6) -- Live Unity Bridge
|
|
44
|
+
`editor status` | `editor invoke` | `editor console-follow` | `editor list` | `editor install` | `editor uninstall`
|
|
34
45
|
|
|
35
46
|
### Utilities (8)
|
|
36
47
|
`search` | `grep` | `clone` | `version` | `docs` | `setup` | `cleanup` | `status`
|
|
37
48
|
|
|
38
49
|
Run any command with `--help` for full options.
|
|
39
50
|
|
|
51
|
+
## Loaded Edit Protection
|
|
52
|
+
|
|
53
|
+
When editor bridge is connected, file-based mutators that still edit `.unity`/`.prefab` files are soft-protected. If a remaining file-based command targets a loaded file, pass `--bypass-loaded-protection`.
|
|
54
|
+
|
|
55
|
+
This affects scene/prefab mutators including:
|
|
56
|
+
- `clone`
|
|
57
|
+
- `delete gameobject|component|prefab|asset`
|
|
58
|
+
|
|
59
|
+
Scene/prefab graph creation and mutation should now go through `editor invoke UnityAgenticTools.Create.* ...` or `UnityAgenticTools.Update.* ...`, not `--bypass-loaded-protection`.
|
|
60
|
+
|
|
61
|
+
If editor bridge is offline/unreachable, the remaining file-based operations behave the same as before, but `editor invoke UnityAgenticTools.Create.* ...` and `UnityAgenticTools.Update.* ...` cannot run.
|
|
62
|
+
|
|
63
|
+
## Editor-Only Scene / Prefab Mutation APIs
|
|
64
|
+
|
|
65
|
+
`UnityAgenticTools.Create.Scenes`
|
|
66
|
+
- `Scene(assetPath, includeDefaults = false)`
|
|
67
|
+
- `GameObject(assetPath, name, parentPath = "")`
|
|
68
|
+
- `Component(assetPath, gameObjectPath, componentType)`
|
|
69
|
+
- `ComponentCopy(assetPath, sourceGameObjectPath, sourceComponentType, sourceComponentIndex, targetGameObjectPath)`
|
|
70
|
+
|
|
71
|
+
`UnityAgenticTools.Create.Prefabs`
|
|
72
|
+
- `Prefab(assetPath, name = "")`
|
|
73
|
+
- `PrefabVariant(sourcePrefabPath, outputPath, variantName = "")`
|
|
74
|
+
- `PrefabInstance(assetPath, prefabPath, parentPath = "", instanceName = "", localPosX = 0, localPosY = 0, localPosZ = 0)`
|
|
75
|
+
|
|
76
|
+
`UnityAgenticTools.Create.Assets`
|
|
77
|
+
- `ScriptableObject(assetPath, script, initialValuesJson = "")`
|
|
78
|
+
- `Meta(scriptPath)`
|
|
79
|
+
- `Material(assetPath, shaderGuid, materialName = "")`
|
|
80
|
+
- `InputActions(assetPath, name)`
|
|
81
|
+
- `Animation(assetPath, clipName = "", sampleRate = 60, loopTime = false)`
|
|
82
|
+
- `Animator(assetPath, controllerName = "", layerName = "Base Layer")`
|
|
83
|
+
|
|
84
|
+
`UnityAgenticTools.Create.Project`
|
|
85
|
+
- `Build(scenePath, position = -1)`
|
|
86
|
+
- `Package(name, version)`
|
|
87
|
+
|
|
88
|
+
`UnityAgenticTools.Update.Objects`
|
|
89
|
+
- `GameObject(assetPath, gameObjectPath, propertyPath, value)`
|
|
90
|
+
- `Component(assetPath, gameObjectPath, componentType, componentIndex, propertyPath, value)`
|
|
91
|
+
- `Transform(assetPath, gameObjectPath, position = "", rotation = "", scale = "")`
|
|
92
|
+
- `Parent(assetPath, gameObjectPath, newParentPath = "")`
|
|
93
|
+
- `SiblingIndex(assetPath, gameObjectPath, index)`
|
|
94
|
+
|
|
95
|
+
`UnityAgenticTools.Update.Serialized`
|
|
96
|
+
- `Array(assetPath, gameObjectPath, componentType, componentIndex, arrayProperty, action, payloadJson = "")`
|
|
97
|
+
- `Batch(assetPath, editsJson)`
|
|
98
|
+
- `BatchComponents(assetPath, editsJson)`
|
|
99
|
+
- `ManagedReference(assetPath, gameObjectPath, componentType, componentIndex, fieldPath, typeName, initialValuesJson = "", append = false)`
|
|
100
|
+
|
|
101
|
+
`UnityAgenticTools.Update.Prefabs`
|
|
102
|
+
- `PrefabUnpack(assetPath, prefabInstancePath, mode = "OutermostRoot")`
|
|
103
|
+
- `PrefabOverride(assetPath, gameObjectPath, componentType, componentIndex, propertyPath, value)`
|
|
104
|
+
- `PrefabBatchOverrides(assetPath, editsJson)`
|
|
105
|
+
- `PrefabManagedReference(assetPath, gameObjectPath, componentType, componentIndex, fieldPath, typeName, initialValuesJson = "", append = false)`
|
|
106
|
+
- `PrefabRemoveOverride(assetPath, gameObjectPath, componentType, componentIndex, propertyPath)`
|
|
107
|
+
- `PrefabRemoveComponent(assetPath, gameObjectPath, componentType, componentIndex)`
|
|
108
|
+
- `PrefabRestoreComponent(assetPath, gameObjectPath, componentType, componentIndex)`
|
|
109
|
+
- `PrefabRemoveGameObject(assetPath, gameObjectPath)`
|
|
110
|
+
- `PrefabRestoreGameObject(assetPath, gameObjectPath)`
|
|
111
|
+
|
|
40
112
|
## Requirements
|
|
41
113
|
|
|
42
114
|
- Bun runtime
|