Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

zlua-alias

/zlua-alias

Zmienia nazwy kluczy metod C# w Lua, używając atrybutu LuaAlias lub XML ZLuaAlias.

Repozytorium
unity-mcp ↗
Licencja
MIT
Ostatnia zmiana repozytorium
02.11.2026

Ocena i bezpieczeństwo

95/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść30 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 02.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Zmienia nazwy kluczy metod C# w Lua, używając atrybutu LuaAlias lub XML ZLuaAlias.

Oryginalny opis (EN)

Renames a C# method's Lua key with [LuaAlias] or ZLuaAlias XML. Use when the user mentions LuaAlias, ZLuaAlias, luaAliasXmlPaths, a short colon name, or a method that should no longer be called by its C# name.

Jak działa

  1. Attribute
  2. XML
Sekcje z nagłówków SKILL.md, w oryginale · 54 linii, 344 słów
Podgląd SKILL.md
---
name: zlua-alias
description: >-
  Renames a C# method's Lua key with [LuaAlias] or ZLuaAlias XML. Use when
  the user mentions LuaAlias, ZLuaAlias, luaAliasXmlPaths, a short colon name,
  or a method that should no longer be called by its C# name.
---

# LuaAlias

`[LuaAlias]` replaces the Lua key. It does not add a second name. After an alias, that method is not registered under `MethodInfo.Name`. Full signature keys still use the CLR name (`demo['Run(System.Int32)']`). See `zlua-method-overload`.

| | |
|--|--|
| Attribute | `[LuaAlias("run_i32")]` on the method only. One alias. Not inherited by overrides |
| XML root | `ZLuaAlias` |
| Settings | `luaAliasXmlPaths` |

Do not mix this file with `ZLuaMarshalAs` or `ZLuaExtensions`.

Hot-update assemblies (including HybridCLR) use the attribute only. XML is ignored. Precompiled, AOT, or third-party assemblies that are not hot-update use XML. Il2Cpp bakes XML at Generate. The Player does not read XML. Mono reads the Settings path list at runtime.

## Attribute

```csharp
using ZLua;

[LuaAlias("run_i32")]
public void Run(int value) { }

public void Run(string value) { }
```

```lua
demo:run_i32(10)   -- Run(int). "Run" no longer selects this overload
demo:Run("hi")     -- only overloads that were not renamed
```

The same alias on two methods, or an alias equal to another method's default name, joins one overload group. Callers then dispatch. Static names go on the type table (`Demo.add_i32(...)`). Instance names use a colon. Groups do not cross static and instance, or ByVal and ByObj.

If the final name matches a field or a parameterless property, method lookup still wins.

## XML

`Assembly/@name` is `Assembly.GetName().Name` (for example `Assembly-CSharp`), not a path or `.dll`. `Type/@fullName` is the CLR name. Nested types use `Outer+Inner`. An open generic container is ``Foo`1``. `Method/@name` is `MethodInfo.Name`. `Method/@signature` is parameters only, in parentheses, with no return type: `()`, `(System.Int32)`, `(System.Int32,System.String)`. Byref types end with `&`. `@alias` is required and is the only Lua name.

```xml
<?xml version="1.0" encoding="utf-8"?>
<ZLuaAlias version="1">
  <Assembly name="Assembly-CSharp">
    <Type fullName="Demo">
      <Method name="Run" signature="(System.Int32)" alias="run_i32"/>
    </Type>
  </Assembly>
</ZLuaAlias>
```

`version` must be `"1"`. This file allows only `Assembly` / `Type` / `Method` with `@alias`. No `MarshalAs`, `Param`, `Return`, `Field`, or `Property`.

On the same method, the attribute wins and the XML entry is unused. Two `@alias` values for the same `(assembly, type, method, signature)` fail. Two different methods may share one final name.

Wersje

W bazie nie ma innych skilli o nazwie zlua-alias.

Migawka bazy z 13.11.2026 · wersja paczki 76cacfe658ec (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

  • 85zlua-method-overload
    Rozstrzyga przeciążenia metod C# z Lua: domyślny dobór, klucze pełnej sygnatury i moment użycia LuaAlias.
  • 95zlua-generic-method
    Zamyka typy generyczne C# w Lua przez make_generic_type, zlua.inflate i prefiksy GTAP, na przykład dla List<T>.
  • 100grandma3-lua-api
    Pomaga pisać i debugować wtyczki oraz skrypty Lua dla grandMA3 z użyciem Object API, dialogów UI i struktury wtyczek XML.
  • 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.
  • 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.
  • 100lua-embedding-scripting
    Osadza środowisko Lua w aplikacjach w C, Go i Rust, żeby obsługiwać skrypty pluginów i reguły konfiguracji.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.