"name" field is nil after creating object from record draft
Build: Dev Nightly as of 5-16-2024
Code that reproduces the bug:
local recTable = {name = "Bench Vice", model = "meshes/w/W_6th_Hammer.NIF"}
local recordDraft = types.Activator.createRecordDraft(recTable)
local newRecord = world.createRecord(recordDraft)
local activator = world.createObject(newRecord.id)
activator:teleport(data.station.cell, data.station.position, {rotation = data.station.rotation})
async:newUnsavableSimulationTimer(0.2, function()
print("workbench: activator: name" .. tostring(activator.name))
end)
Note: the async is not necessary, I wanted to illustrate that the bug is not caused by the object being mid-teleport.
Edited by Alexei Kotov