Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Unreal Angelscript Tool-calling (Fork)New to Visual Studio Code? Get it now.
Unreal Angelscript Tool-calling (Fork)

Unreal Angelscript Tool-calling (Fork)

jiangxiaoxu

|
3 installs
| (0) | Free
Language Server and Debug Adapter for the UnrealEngine-Angelscript plugin. Based on https://github.com/jiangxiaoxu/vscode-unreal-angelscript-tool-calling (forked from https://github.com/Hazelight/UnrealEngine-Angelscript).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Language Model Tool

This branch specifically implements the runtime required to expose Language Model Tool calls for Copilot’s use. 本分支实现的目标是让相关工具调用可以被 GitHub Copilot 使用。

  • Exposes the angelscript_searchApi tool call so Copilot can query the API.
  • 提供了 angelscript_searchApi 工具调用以便 Copilot 查询 API。

MCP (HTTP) 支持 / MCP (HTTP) support

为了让 Codex 通过 MCP 调用同样的 angelscript_searchApi 能力,本仓库增加了一个内置的 Streamable HTTP MCP server,会复用 Angelscript language server 的 API 搜索逻辑。 对外暴露工具名:angelscript_searchApi(输入/输出与现有 schema 一致,输出为 JSON 字符串)。

默认行为:

  • 扩展启动后每 1 秒检查 localhost:<端口>/health 是否存在 MCP 服务(校验 serverId,超时 300–500ms)。
  • 若没有 MCP 服务,则尝试绑定端口并启动 MCP 服务。
  • 若端口被占用或已有 MCP 服务,扩展会静默等待并重试。
  • 若端口被其它服务占用(/health 无法连通且绑定失败多次),扩展会提示错误并停止重试。
  1. 编译插件:
    npm run compile
    
  2. 在 VS Code 配置中启用并设置端口(可选,默认启用):
    {
      "UnrealAngelscript.mcp.enabled": true,
      "UnrealAngelscript.mcp.port": 0,
      "UnrealAngelscript.mcp.maxStartupFailures": 5
    }
    
    说明:mcp.port = 0 表示使用 UnrealAngelscript.unrealConnectionPort + 100 作为端口。
  3. 在 Codex 配置中添加 MCP server(HTTP):
    [mcp_servers.angelscript]
    url = "http://127.0.0.1:27199/mcp"
    

说明:

  • MCP server 会连接 Unreal Editor(默认端口 27099)来加载类型信息,确保 Unreal Editor 已运行。
  • 多个 VS Code 实例会共享同一端口,只有一个实例会启动 MCP 服务。

Language Server and Debug Adapter for use with the UnrealEngine-Angelscript plugin from https://angelscript.hazelight.se

Getting Started

After building or downloading the Unreal Editor version with Angelscript enabled from the github page linked above, start the editor and use visual studio code to open the 'Script' folder created in your project directory. Your 'Script' folder must be set as the root/opened folder for the extension to function.

Features

Editor Connection

The unreal-angelscript extension automatically makes a connection to the running Unreal Editor instance for most of its functionality. If the editor is not running, certain features will not be available.

Code Completion

The extension will try to complete your angelscript code as you type it using normal visual studio code language server features.

Error Display

When saving a file the unreal editor automatically compiles and reloads it, sending any errors to the visual code extension. Errors will be highlighted in the code display and in the problems window.

Debugging

You can start debugging from the Debug sidebar or by pressing F5. While debug mode is active, breakpoints can be set in angelscript files and the unreal editor will automatically break and stop execution when they are reached.

Hitting 'Stop' on the debug toolbar will not close the unreal editor, it merely stops the debug connection, causing breakpoints to be ignored.

When the debug connection is active, any exceptions that occur during angelscript execution will automatically cause the editor and visual studio code to pause execution and show the exception.

Go to Symbol

The default visual studio code 'Go to Definition' (F12) is implemented for angelscript symbols. A separate command is added to the right click menu (default shortcut: Alt+G), named 'Go to Symbol'. This command functions identically to 'Go to Definition' for angelscript symbols.

If you have the Unreal Editor open as well as Visual Studio proper showing the C++ source code for unreal, the extension will try to use its unreal editor connection to browse your Visual Studio to the right place, similar to double clicking a C++ class or function in blueprints.

This uses the standard unreal source navigation system, which is only implemented for classes and functions.

Add Import To

The 'Add Import To' (default shortcut: Shift+Alt+I) command from the right click menu will try to automatically add an import statement to the top of the file to import the type that the command was run on.

Quick Open Import

The 'Quick Open Import' (default shortcut: Ctrl+E or Ctrl+P) command from the right click menu will try to open the quick open navigation with the import statement.

More Language Features

This extension acts as a full language server for angelscript code. This includes semantic highlighting, signature help, reference search, rename symbol and a number of helpful code actions and quickfixes.

Some of these features require an active connection to the unreal editor.

Semantic Symbol Colors

There are more types of semantic symbols generated by the extension than there are colors specified by most color themes.

The default visual studio code color theme will display all variables in blue, for example, regardless of whether the variable is a member, parameter or local.

You can add a snippet to your .vscode/settings.json inside your project folder to add extra colors to make these differences more visible.

For example, to add extra colors to the default vscode dark theme:

    "editor.tokenColorCustomizations": {
		"[Default Dark+]": {
			"textMateRules": [
				{
					"scope": "support.type.component.angelscript",
					"settings": {
						"foreground": "#4ec962"
					}
				},
				{
					"scope": "support.type.actor.angelscript",
					"settings": {
						"foreground": "#2eb0c9"
					}
				},
				{
					"scope": "variable.parameter.angelscript",
					"settings": {
						"foreground": "#ffe5d9"
					}
				},
				{
					"scope": "variable.other.local.angelscript",
					"settings": {
						"foreground": "#e8ffed"
					}
				},
				{
					"scope": "variable.other.global.angelscript",
					"settings": {
						"foreground": "#b99cfe"
					}
				},
				{
					"scope": "variable.other.global.accessor.angelscript",
					"settings": {
						"foreground": "#b99cfe"
					}
				},
				{
					"scope": "entity.name.function.angelscript",
					"settings": {
						"foreground": "#b99cfe"
					}
				},
				{
					"scope": "invalid.unimported.angelscript",
					"settings": {
						"foreground": "#ff9000"
					}
				},
			]
		}
	}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft