zlua-method-overload
/zlua-method-overload
Rozstrzyga przeciążenia metod C# z Lua: domyślny dobór, klucze pełnej sygnatury i moment użycia LuaAlias.
- Autor
- killop ↗
- Repozytorium
- unity-mcp ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 02.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 02.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Rozstrzyga przeciążenia metod C# z Lua: domyślny dobór, klucze pełnej sygnatury i moment użycia LuaAlias.
Oryginalny opis (EN)
Resolves C# method overloads from Lua: default dispatch, full signature keys, and when to use LuaAlias. Use when several C# methods share a name or a call is ambiguous. Optional parameters are zlua-default-arguments.
Jak działa
- How to call
Podgląd SKILL.md
---
name: zlua-method-overload
description: >-
Resolves C# method overloads from Lua: default dispatch, full signature keys,
and when to use LuaAlias. Use when several C# methods share a name or a call
is ambiguous. Optional parameters are zlua-default-arguments.
---
# Method overloads
Lua has no static types. ZLua picks an overload at the call. One public candidate is a direct closure. Two or more candidates are a dispatch closure. There is no API to attach a short name after bind; short names come from `[LuaAlias]` or alias XML (`zlua-alias`).
Open generic methods such as `GetComponent<T>` are not overloads. See `zlua-generic-method`.
## How to call
| Need | Write |
|------|--------|
| Arguments pick one overload | `demo:Run(10)` or `demo:Run("hi")` |
| Name one overload exactly | `demo['Run(System.Int32)'](demo, 5)` |
| Hot path, short colon call | `[LuaAlias]` / `ZLuaAlias`, then `demo:run_i32(5)` |
| Same overload in a loop | `local run = demo['Run(System.Int32)']; run(demo, 5)` |
The signature key is `MethodName(ParamFullName,...)` with no return type. The name is `MethodInfo.Name`, not the alias. Byref parameters keep `&` (`System.Single&`). The first access is a miss: ZLua resolves it, caches a direct closure, and returns it. Constructors are not signature keys; they stay on `Type(...)`.
A signature key does not remove the short name. `Run` can still dispatch while `Run(System.Int32)` is fixed.
Trailing optional parameters, including the "fewer defaults wins" tie-break, are `zlua-default-arguments`. `params T[]` is `zlua-params`.
Wersje
W bazie nie ma innych skilli o nazwie zlua-method-overload.
Migawka bazy z 13.11.2026 · wersja paczki 4a888937bbc1 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95zlua-alias
Zmienia nazwy kluczy metod C# w Lua, używając atrybutu LuaAlias lub XML ZLuaAlias. - 95zlua-default-arguments
Pomija w Lua opcjonalne parametry C# na końcu i uzupełnia je buforowanymi wartościami domyślnymi. - 90overload
Uruchamia, wznawia lub konfiguruje zadanie deweloperskie Workflow Overload, tylko gdy użytkownik wpisze /overload. - 90lua-guide
Pomaga pisać ogólne skrypty Lua 5.4+: moduły, zakresy zmiennych, metatabele, korutyny i obsługę błędów w plikach .lua. - 90sherlock
Sprawdza skompilowane zespoły .NET przez narzędzia MCP: składowe typów, sygnatury, implementacje interfejsów i wywołania metod. - 85Lua C Integration
Omawia Lua C API do rozszerzania Lua kodem natywnym: operacje na stosie, wywołania C z Lua i odwrotnie, moduły C, userdata, metatabele i optymalizacje wydajności.