Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

FindObject

local obj = FindObject(className, name)

找类型为 className(含子类)、短名等于 name 的第一个对象。

参数

#类型说明
1string类名
2string对象的短名(obj:GetName() 的结果)

返回值

UObject,找不到时是无效对象。

示例

-- 找蓝图类对象
local cls = FindObject("WidgetBlueprintGeneratedClass", "WBP_NUI_MasterSlider_C")