LocalObject

LocalObject

LocalObject 类是所有其他对象继承的两个基类之一,另一个是 RemoteObject。

它包含一个由 Lua 持有的内联 C++ 对象。

继承关系

无

方法

IsValid()

  • 返回类型: bool
  • 返回值: 出于历史兼容原因,始终为 true

示例

-- 'FText' inherits from LocalObject.
local Text = FText("SomeText")
if Text:IsValid() then
    print("This should always happen\n")
else
    print("This should never happen\n")
end

原文:docs/lua-api/classes/localobject.md · 固定提交 560411f18512 · 来源与 MIT 许可