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 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 update transform MyScene.unity "Main Camera" -p 0,5,-10
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
- ## Commands (126 total)
18
+ ## Command Surface
19
19
 
20
- ### Read (21)
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
- ### Create (15)
24
- `create gameobject` | `create scene` | `create prefab-variant` | `create prefab-instance` | `create scriptable-object` | `create meta` | `create component` | `create component-copy` | `create build` | `create material` | `create package` | `create input-actions` | `create animation` | `create animator` | `create prefab`
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
- ### Update (28)
27
- `update gameobject` | `update component` | `update transform` | `update scriptable-object` | `update settings` | `update tag` | `update layer` | `update sorting-layer` | `update parent` | `update build` | `update array` | `update batch` | `update batch-components` | `update material` | `update meta` | `update animation` | `update animator` | `update sibling-index` | `update input-actions` | `update animation-curves` | `update animator-state` | `update prefab` (7 subcommands)
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
- ### Delete (5)
30
- `delete gameobject` | `delete component` | `delete build` | `delete prefab` | `delete package`
34
+ ### Create (0 top-level)
35
+ Creation is editor-only now. Use `unity-agentic-tools editor invoke UnityAgenticTools.Create.* ...`.
31
36
 
32
- ### Editor (49) -- Live Unity Bridge
33
- `editor status` | `editor play` | `editor stop` | `editor pause` | `editor step` | `editor play-state` | `editor save` | `editor scene-open` | `editor active-scene` | `editor refresh` | `editor compiling` | `editor selection-get` | `editor selection-set` | `editor selection-clear` | `editor console-logs` | `editor console-clear` | `editor console-follow` | `editor menu` | `editor screenshot` | `editor tests-run` | `editor install` | `editor uninstall` | `editor hierarchy-snapshot` | `editor ui-snapshot` | `editor input-map` | `editor get text` | `editor get value` | `editor get active` | `editor get position` | `editor get component` | `editor ui-click` | `editor ui-fill` | `editor ui-type` | `editor ui-toggle` | `editor ui-slider` | `editor ui-select` | `editor ui-scroll` | `editor ui-focus` | `editor input-key` | `editor input-mouse` | `editor input-touch` | `editor input-action` | `editor wait`
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