e2b570d938
The whole manage_vfx tool dispatcher and every VfxGraph* helper is
gated behind '#if UNITY_VFX_GRAPH', but nothing in the Editor asmdef
ever defined that symbol. Users with com.unity.visualeffectgraph
properly installed (e.g. Unity 6.3 + VFX Graph 17.x) hit the false
"VFX Graph package (com.unity.visualeffectgraph) not installed" branch
for every action, including read-only ones like list_templates and
get_info — reported via Discord.
Add a versionDefines entry to MCPForUnity.Editor.asmdef so Unity sets
UNITY_VFX_GRAPH whenever the VFX Graph package is present at any
version (`expression: 0.0.0`). This is the canonical way to detect
optional packages and lets the existing #if branches do their job.
Also drop ValidateVfxGraphVersion's hard-coded {"12.1"} allowlist,
which only matches Unity 2022.3-era VFX Graph and would still block
CreateAsset on modern installs even after the compile-gate fix. The
asset-level APIs we touch (VisualEffectAsset, AssetDatabase.CopyAsset,
template enumeration via PackageInfo) are stable across the
12.x → 17.x range, so the safer guard is just "package present" with
the compile-time gate handling the real "not installed" path.
25 lines
581 B
Plaintext
25 lines
581 B
Plaintext
{
|
|
"name": "MCPForUnity.Editor",
|
|
"rootNamespace": "MCPForUnity.Editor",
|
|
"references": [
|
|
"MCPForUnity.Runtime"
|
|
],
|
|
"includePlatforms": [
|
|
"Editor"
|
|
],
|
|
"excludePlatforms": [],
|
|
"overrideReferences": true,
|
|
"precompiledReferences": [
|
|
"Newtonsoft.Json.dll"
|
|
],
|
|
"autoReferenced": true,
|
|
"defineConstraints": [],
|
|
"versionDefines": [
|
|
{
|
|
"name": "com.unity.visualeffectgraph",
|
|
"expression": "0.0.0",
|
|
"define": "UNITY_VFX_GRAPH"
|
|
}
|
|
],
|
|
"noEngineReferences": false
|
|
} |