|
1 | 1 | import React from 'react'; |
2 | 2 | import Link from '@docusaurus/Link'; |
| 3 | +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; |
3 | 4 | import styles from './styles.module.css'; |
4 | 5 |
|
5 | | -const features = [ |
6 | | - { |
7 | | - n: '01', |
8 | | - kicker: 'CONTROL', |
9 | | - title: 'Talk to the Editor.', |
10 | | - body: 'Drive scenes, GameObjects, scripts, assets, prefabs, and materials with natural language. 43 tools across 9 groups expose Unity’s editing surface to your MCP client.', |
11 | | - href: '/reference/tools', |
12 | | - cta: 'Browse tools', |
13 | | - }, |
14 | | - { |
15 | | - n: '02', |
16 | | - kicker: 'ROUTING', |
17 | | - title: 'Multiple Editors, one session.', |
18 | | - body: 'Open several Unity Editors at once and aim a single MCP session at any of them. Per-call routing for cross-project prompts; session isolation across MCP clients.', |
19 | | - href: '/guides/multi-instance', |
20 | | - cta: 'How routing works', |
21 | | - }, |
22 | | - { |
23 | | - n: '03', |
24 | | - kicker: 'TRANSPORT', |
25 | | - title: 'HTTP or stdio. Your call.', |
26 | | - body: 'HTTP for multi-agent, remote-hosted, and shared workflows. Stdio for single-client setups like Claude Desktop. Auto-detected and auto-configured.', |
27 | | - href: '/architecture/transports', |
28 | | - cta: 'HTTP vs stdio', |
29 | | - }, |
30 | | - { |
31 | | - n: '04', |
32 | | - kicker: 'VISIBILITY', |
33 | | - title: 'Your tools, on demand.', |
34 | | - body: 'Per-session visibility. Activate animation, vfx, ui, testing, or probuilder tools only when needed. Smaller prompt, sharper routing, lower cost.', |
35 | | - href: '/guides/tool-groups', |
36 | | - cta: 'Tool groups', |
37 | | - }, |
38 | | - { |
39 | | - n: '05', |
40 | | - kicker: 'DOCS', |
41 | | - title: 'Generated, never stale.', |
42 | | - body: 'Every tool and resource page is generated from the Python @mcp_for_unity_tool registry. CI fails if the docs drift. Examples you write are preserved across regenerations.', |
43 | | - href: '/contributing/docs', |
44 | | - cta: 'Docs workflow', |
45 | | - }, |
46 | | - { |
47 | | - n: '06', |
48 | | - kicker: 'EXTEND', |
49 | | - title: 'Plug in custom tools.', |
50 | | - body: 'Write a C# attribute, register a new domain. The MCP client picks it up automatically. Project-scoped or global. Full reflection-based dispatch.', |
51 | | - href: '/guides/custom-tools', |
52 | | - cta: 'Custom tools', |
53 | | - }, |
54 | | -]; |
| 6 | +function getFeatures(toolCount, toolGroupCount) { |
| 7 | + return [ |
| 8 | + { |
| 9 | + n: '01', |
| 10 | + kicker: 'CONTROL', |
| 11 | + title: 'Talk to the Editor.', |
| 12 | + body: `Drive scenes, GameObjects, scripts, assets, prefabs, and materials with natural language. ${toolCount} tools across ${toolGroupCount} groups expose Unity's editing surface to your MCP client.`, |
| 13 | + href: '/reference/tools', |
| 14 | + cta: 'Browse tools', |
| 15 | + }, |
| 16 | + { |
| 17 | + n: '02', |
| 18 | + kicker: 'ROUTING', |
| 19 | + title: 'Multiple Editors, one session.', |
| 20 | + body: 'Open several Unity Editors at once and aim a single MCP session at any of them. Per-call routing for cross-project prompts; session isolation across MCP clients.', |
| 21 | + href: '/guides/multi-instance', |
| 22 | + cta: 'How routing works', |
| 23 | + }, |
| 24 | + { |
| 25 | + n: '03', |
| 26 | + kicker: 'TRANSPORT', |
| 27 | + title: 'HTTP or stdio. Your call.', |
| 28 | + body: 'HTTP for multi-agent, remote-hosted, and shared workflows. Stdio for single-client setups like Claude Desktop. Auto-detected and auto-configured.', |
| 29 | + href: '/architecture/transports', |
| 30 | + cta: 'HTTP vs stdio', |
| 31 | + }, |
| 32 | + { |
| 33 | + n: '04', |
| 34 | + kicker: 'VISIBILITY', |
| 35 | + title: 'Your tools, on demand.', |
| 36 | + body: 'Per-session visibility. Activate animation, vfx, ui, testing, or probuilder tools only when needed. Smaller prompt, sharper routing, lower cost.', |
| 37 | + href: '/guides/tool-groups', |
| 38 | + cta: 'Tool groups', |
| 39 | + }, |
| 40 | + { |
| 41 | + n: '05', |
| 42 | + kicker: 'DOCS', |
| 43 | + title: 'Generated, never stale.', |
| 44 | + body: 'Every tool and resource page is generated from the Python @mcp_for_unity_tool registry. CI fails if the docs drift. Examples you write are preserved across regenerations.', |
| 45 | + href: '/contributing/docs', |
| 46 | + cta: 'Docs workflow', |
| 47 | + }, |
| 48 | + { |
| 49 | + n: '06', |
| 50 | + kicker: 'EXTEND', |
| 51 | + title: 'Plug in custom tools.', |
| 52 | + body: 'Write a C# attribute, register a new domain. The MCP client picks it up automatically. Project-scoped or global. Full reflection-based dispatch.', |
| 53 | + href: '/guides/custom-tools', |
| 54 | + cta: 'Custom tools', |
| 55 | + }, |
| 56 | + ]; |
| 57 | +} |
55 | 58 |
|
56 | 59 | export default function HomeFeatures() { |
| 60 | + const { siteConfig } = useDocusaurusContext(); |
| 61 | + const toolCount = siteConfig.customFields?.toolCount ?? 47; |
| 62 | + const toolGroupCount = siteConfig.customFields?.toolGroupCount ?? 10; |
| 63 | + const features = getFeatures(toolCount, toolGroupCount); |
| 64 | + |
57 | 65 | return ( |
58 | 66 | <section className={styles.section}> |
59 | 67 | <div className={styles.inner}> |
|
0 commit comments