getObjectByClass
Definition
-- @/lua/ge/ge_utils.lua:647
-- returns first hit with the correct class. Example: getObjectByClass("TimeOfDay")
function getObjectByClass(className)
local o = scenetree.findClassObjects(className)
if not o or #o == 0 then return nil end
o = scenetree.findObject(o[1])
if not o then return nil end
return o
end
Callers
@/lua/ge/extensions/editor/biomeTool.lua
terrainBlock = getObjectByClass("TerrainBlock")
populateMaterialsList()
@/lua/ge/extensions/ui/uiNavi.lua
local minimap = {}
local terr = getObjectByClass("TerrainBlock")
if terr then
@/lua/ge/ge_utils.lua
-- returns first hit with the correct class. Example: getObjectByClass("TimeOfDay")
function getObjectByClass(className)
function getTimeOfDay(asString)
local tod = getObjectByClass("TimeOfDay")
if not tod then return nil end
function setTimeOfDay(inp)
local tod = getObjectByClass("TimeOfDay")
if not tod then return false end