GE Lua Documentation

Press F to search!

getUniqueName

Definition


-- @/=[C]:-1
function getUniqueName(...)

Callers

@/lua/ge/extensions/editor/forestEditor.lua
  local internalName = getUniqueForestBrushInternalName()
  fb:setName(Sim.getUniqueName("ForestBrush_" .. internalName))
  fb:setInternalName(internalName)
  local fbe = ForestBrushElement()
  local internalName = Sim.getUniqueName(getUniqueForestBrushElementInternalName())
local function newForestItemData(data)
  local name = Sim.getUniqueName(data.filename:match("(.+)%."))
  local objId = editor.createDataBlock(name, "ForestItemData", nil, editor.levelPath .. "art/forest/managedItemData.json")
@/lua/ge/extensions/editor/roadSpline/import.lua
      else
        local fallbackName = Sim.getUniqueName("RestoredDecalRoad")
        obj:registerObject(fallbackName)
@/lua/ge/extensions/gameplay/crawl/utils.lua
    local _, fn = path.splitWithoutExt(filePath)
    local scenetreeObject = spawnPrefab(Sim.getUniqueName(fn), filePath, 0 .. " " .. 0 .. " " .. 0, "0 0 1 0", "1 1 1", false)
    scenetreeObject.canSave = false
@/lua/ge/extensions/editor/missionEditor/prefabs.lua
        local dir, filename, ext = path.split(file)
        local p = spawnPrefab(Sim.getUniqueName(self.mission.id.."-"..filename),file,"0 0 0","0 0 1 0","1 1 1")
        if p then
@/lua/ge/extensions/freeroam/bigMapMode.lua
      fog.dynamic = true
      fog:registerObject(Sim.getUniqueName("mapBoundFog" .. i))
      mapBoundsFogPool[i] = fog
@/lua/ge/extensions/editor/decalSpline/populate.lua
      template:setField("material", 0, componentPath)
      local name = Sim.getUniqueName(componentPath) -- Get a unique name for the decal data object.
      template:registerObject(name)
@/lua/ge/extensions/flowgraph/modules/cameraModule.lua

function C:getUniqueName(prefix)
  return prefix.."-"..self:getFreeId()
@/lua/ge/extensions/editor/api/roadRiver.lua

  mesh:registerObject(Sim.getUniqueName("New" .. type))
  scenetree.MissionGroup:add(mesh)
@/lua/ge/extensions/editor/util/editorElementHelper.lua
      if im.Selectable1("Spawn Prefab at Origin") then
        local prefab = spawnPrefab(Sim.getUniqueName(e.label..e._id),e.foundFile,"0 0 0","0 0 1 0","1 1 1")
        if prefab then
@/lua/ge/extensions/editor/roadSpline/layerMgr.lua

  local name = Sim.getUniqueName(layer.name .. "_chunk")
  decalRoad:registerObject(name)
      newDecalRoad:setField("detail", 0, defaultDecalRoadDetail)
      local name = Sim.getUniqueName(layer.name) -- Get a unique name for the decal road object.
      newDecalRoad:registerObject(name)
@/lua/ge/extensions/editor/api/object.lua
      name = name .. "_unpacked"
      name = Sim.getUniqueName(name)
      newGroup:setName(name)
    if convertedPrefab then
      name = Sim.getUniqueName(name)
      local instance = editor.replaceGroupWithPrefabInstance(convertedPrefab, parentGroup, name, bboxCenter)
  if obj and name then
    obj:setName(Sim.getUniqueName(name))
  end
@/lua/ge/extensions/gameplay/missions/missionTypes/editorHelper.lua
      if im.Selectable1("Spawn Prefab at Origin") then
        local prefab = spawnPrefab(Sim.getUniqueName(mission.id.." - " .. e.label),e.foundFile,"0 0 0","0 0 0 1","1 1 1")
        if prefab then
@/lua/ge/extensions/flowgraph/nodes/scene/camera/procedural/procCamPathPosRot.lua

    local name = self.mgr.modules.camera:getUniqueName(self.id .. "pcp")
    local id = self.mgr.modules.camera:addCustomPath(name, path, true)
@/lua/ge/extensions/core/groundMarkerArrows.lua
      arrow.canSave = false
      arrow:registerObject(Sim.getUniqueName("arrow"))
      if not simObjectExists(arrow) then
@/lua/ge/extensions/editor/objectToSplineEditor.lua
    newGroup = createObject("SimGroup")
    newGroup:registerObject(Sim.getUniqueName("SplineObjects"))
    scenetree.MissionGroup:addObject(newGroup)
@/lua/ge/extensions/editor/api/decal.lua
local function createDecalTemplate()
  local name = Sim.getUniqueName("NewTemplate")
  local templates = Engine.Render.DecalMgr.getSet():getObjects()
@/lua/ge/extensions/editor/particleEditor.lua
  if not actionData.id then
    local newEmitterName = Sim.getUniqueName("newEmitter")
    actionData.id = editor.createDataBlock(newEmitterName, "ParticleEmitterData", "DefaultEmitter", defaultEmitterFile)
  if not actionData.particleID then
    local newParticleName = Sim.getUniqueName("newParticle")
    actionData.particleID = editor.createDataBlock(newParticleName, "ParticleData", "DefaultParticle", defaultParticleFile)
      if editor.uiIconImageButton(editor.icons.add_circle, im.ImVec2(22 * im.uiscale[0], 22 * im.uiscale[0]), nil, nil, nil) then
        local newParticleName = Sim.getUniqueName("newParticle")
        editor.createDataBlock(newParticleName, "ParticleData", "DefaultParticle", defaultParticleFile)
@/lua/ge/extensions/util/showroom.lua
  local pos = getSuitablePosition()
  prefab = spawnPrefab(Sim.getUniqueName("Showroom"),prefabPath,string.format("%d %d %d", pos.x, pos.y, pos.z) ,"0 0 1 0","1 1 1", true)
  if not prefab then
@/lua/ge/extensions/editor/assetBrowser.lua
        if editor.assetDragDrop.data.type == 'prefab' then
          var.dragDropMesh = spawnPrefab(Sim.getUniqueName(editor.assetDragDrop.data.fileName), editor.assetDragDrop.data.path, "0 0 0", "1 0 0 0", "1 1 1")
          if var.dragDropMesh then
      fn = function(asset)
        local prefab = spawnPrefab(Sim.getUniqueName(asset.fileName),asset.path,"0 0 0","1 0 0 0","1 1 1")
        if prefab then
      fn = function(asset)
        local prefab = spawnPrefab(Sim.getUniqueName(asset.fileName),asset.path,"0 0 0","1 0 0 0","1 1 1")
        if prefab then
@/lua/ge/extensions/flowgraph/nodes/scene/camera/procedural/procDirectPath.lua

    local name = self.mgr.modules.camera:getUniqueName(self.id .. "pcp")
    local id = self.mgr.modules.camera:addCustomPath(name, path, true)
@/lua/ge/extensions/gameplay/crawl/boundary.lua
  local markerGroup = createObject("SimGroup")
  markerGroup:registerObject(Sim.getUniqueName("BoundaryMarkers"))
  scenetree.MissionGroup:addObject(markerGroup)
  for i, point in ipairs(points) do
    local name = Sim.getUniqueName("BoundaryFlag_" .. i)
    local marker = createObject('TSStatic')
@/gameplay/missionTypes/collection/customNodes/collectionMarkersNode.lua
  marker.scale = vec3(1, 1, 1)
  marker:registerObject(Sim.getUniqueName("Marker"..tostring(pos)))
  return marker:getId()
  light:setField('radius', 0, 3)
  light:registerObject(Sim.getUniqueName("Light"..tostring(pos)))
  return light:getId()