MCPcopy Create free account
hub / github.com/Tencent/xLua / RegisterCaster

Method RegisterCaster

Assets/XLua/Src/ObjectTranslator.cs:1633–1641  ·  view source on GitHub ↗
(GetFunc<T> get)

Source from the content-addressed store, hash-verified

1631 }
1632
1633 public void RegisterCaster<T>(GetFunc<T> get)
1634 {
1635 objectCasters.AddCaster(typeof(T), (L, idx, o) =>
1636 {
1637 T obj;
1638 get(L, idx, out obj);
1639 return obj;
1640 });
1641 }
1642
1643 int decimal_type_id = -1;
1644

Callers

nothing calls this directly

Calls 1

AddCasterMethod · 0.80

Tested by

no test coverage detected