Unity Event logo

Unity Event

CommunityPopular
Besty0728
unity-event

Wire UnityEvent persistent listeners at editor time

Overview

PublisherBesty0728
RepositoryUnity-Skills
Skill nameunity-event
Stars
1.8K
Forks
164
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Besty0728 on GitHub. Read the source before you install it.

Installation

Install the Unity Event AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.

Use it in TypingMind

Enable Unity Event in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Unity Event on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Unity Event is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Before calling any skill in this module: if you are about to call a skill with parameters guessed from its name or description, STOP — read this file (or fetch its schema via GET /skills/recommend?includeSchema=true) first. If you already have the parameter definitions from recommend/schema, you may proceed straight to dryRun.

Triggers

  • Hooking up UnityEvents in the Inspector
  • Wiring button or trigger callbacks
  • Scripting persistent listeners
  • 在 Inspector 里挂接 UnityEvent、连接按钮或触发器回调、脚本化持久监听

Event Skills

Inspect and modify persistent listeners on UnityEvents (e.g. Button.onClick, Toggle.onValueChanged) — the same listeners you see in the Inspector's event drop slots.

Operating Mode

  • Approval:查询类 skill(event_get_listeners / event_list_events / event_get_listener_count,源码标 SkillMode.SemiAuto)直接执行;其余变更/调用类(event_add_listener / event_set_listener / event_set_listener_state / event_invoke / event_add_listener_batch / event_copy_listeners,标 SkillMode.FullAuto)需用户 grant,grant 后服务端一步执行返结果。
  • Auto / Bypass:未被禁列表拦截的 skill 直接执行。
  • 本模块含 Delete 类 skillevent_remove_listenerevent_clear_listeners 标记为 SkillOperation.Delete,被 IsForbiddenInSemi 静态拦截 —— 仅 Bypass 模式或加入 Allowlist 才能调用。
  • event_invoke 只在 Play mode / runtime 下有效;编辑器空跑时仅触发 EditorAndRuntime 监听。event_add_listener 等写入的是 persistent listener(序列化到 prefab/scene),即可在编辑器时配置。

DO NOT (common hallucinations):

  • event_create / event_trigger do not exist → UnityEvents are declared in component source code; this module only wires listeners
  • event_subscribe does not exist → use event_add_listener
  • event_remove does not exist → use event_remove_listener
  • event_add_listener requires exact component type and method name on the target

Routing:

  • For XR interaction events → use xr module's xr_add_interaction_event
  • For C# event code → write via script module

Skills

event_get_listeners

Get persistent listeners of a UnityEvent.

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
componentNamestringYes-Component name
eventNamestringYes-Event field name (e.g. "onClick")

Returns: { success, gameObject, component, eventName, listenerCount, listeners }

event_add_listener

Add a persistent listener to a UnityEvent (Editor time).

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
componentNamestringYes-Component owning the event
eventNamestringYes-Event field name (e.g. "onClick")
targetObjectNamestringYes-GameObject holding the method to call
targetComponentNamestringNonullComponent on the target, or GameObject to call the object itself
methodNamestringYes-Public method or set_PropertyName
modestringNoRuntimeOnlyOff, RuntimeOnly, or EditorAndRuntime
argTypestringNovoidvoid, int, float, string, or bool
floatArgfloatNo0Static float argument
intArgintNo0Static int argument
stringArgstringNonullStatic string argument
boolArgboolNofalseStatic bool argument

Returns: { success, message, index, mode }

Unlike event_set_listener, this skill has no object argType — it only reaches the standard UnityEvent overloads.

event_remove_listener

Remove a persistent listener by index.

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
componentNamestringYes-Component name
eventNamestringYes-Event field name
indexintNo0Listener index

Returns: { success, remainingCount }

event_invoke

Invoke a UnityEvent explicitly (Runtime only).

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
componentNamestringYes-Component name
eventNamestringYes-Event field name

Returns: { success, message }

event_clear_listeners

Remove all persistent listeners from a UnityEvent.

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
componentNamestringYes-Component name
eventNamestringYes-Event field name (e.g. "onClick")

Returns: { success, removed }

event_set_listener_state

Set a listener's call state (Off, RuntimeOnly, EditorAndRuntime).

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
componentNamestringYes-Component name
eventNamestringYes-Event field name
indexintNo0Listener index
statestringNonullCall state: "Off", "RuntimeOnly", or "EditorAndRuntime"

Returns: { success, index, state }

event_set_listener

Replace a persistent listener at a specific index.

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
componentNamestringYes-Source component name
eventNamestringYes-Event field name
indexintNo0Listener index to replace
targetNamestringYes-Target GameObject name
targetInstanceIdintNo0Target GameObject instance ID
targetPathstringNonullTarget hierarchy path
targetComponentNamestringNonullTarget component name, or GameObject
methodNamestringYes-Public method or set_PropertyName
modestringNoRuntimeOnlyOff, RuntimeOnly, or EditorAndRuntime
argTypestringNovoidvoid, int, float, string, bool, object
floatArgfloatNo0Static float argument
intArgintNo0Static int argument
stringArgstringNonullStatic string argument
boolArgboolNofalseStatic bool argument
objectReferenceNamestringNonullScene object argument name
objectReferenceInstanceIdintNo0Scene object argument instance ID
objectReferencePathstringNonullScene object argument path
objectAssetPathstringNonullProject asset argument path
objectTypestringNonullObject/component type for object argument

Returns: { success, index, target, targetType, method, state, argType }

event_list_events

List all UnityEvent fields on a component.

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
componentNamestringYes-Component name

Returns: { success, component, count, events }

event_add_listener_batch

Add multiple listeners at once. items: JSON array of {targetObjectName, targetComponentName, methodName}.

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
componentNamestringYes-Component name
eventNamestringYes-Event field name
itemsstringYes-JSON array of {targetObjectName, targetComponentName, methodName}

Returns: { success, added, total }

event_copy_listeners

Copy listeners from one event to another.

ParameterTypeRequiredDefaultDescription
sourceObjectstringYes-Source GameObject name
sourceComponentstringYes-Source component name
sourceEventstringYes-Source event field name
targetObjectstringYes-Target GameObject name
targetComponentstringYes-Target component name
targetEventstringYes-Target event field name

Returns: { success, copied }

event_get_listener_count

Get the number of persistent listeners on a UnityEvent.

ParameterTypeRequiredDefaultDescription
namestringNonullGameObject name
instanceIdintNo0GameObject instance ID
pathstringNonullGameObject hierarchy path
componentNamestringYes-Component name
eventNamestringYes-Event field name

Returns: { success, count }


Exact Signatures

Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.

Frequently asked questions

What does the Unity Event AI skill do?

Wire UnityEvent persistent listeners at editor time

Why use Unity Event on TypingMind?

Because you install it once and use it with any model. Unity Event is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Unity Event in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Besty0728/Unity-Skills/tree/main/SkillsForUnity/unity-skills~/skills/event. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Unity Event?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Unity Event?

As many as you like. As long as a model supports skills, you can use Unity Event with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Unity Event AI skill free?

Yes. It is published on GitHub by Besty0728 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇