Hello,
I am trying to determine whether a loaded subscene is editable through WorldEditorAPI.
The World Editor hierarchy shows a visually locked layer/container at the top level. However, it contains a loaded subscene named
GameMode_Without_Spawn_Vehicles_Locked_Layer, and the default layer inside that subscene is intended to remain editable so that entities can be placed there.
For the loaded world, the API reports:
loadedSubscenes=2
subscene=0 entityCount=25
subscene=0 defaultLayerId=0 defaultLayerPath=default
layerLocked=0 hierarchyLocked=0
subscene=1 entityCount=0
subscene=1 defaultLayerId=0 defaultLayerPath=default
layerLocked=0 hierarchyLocked=0
The relevant calls are:
int layerId = api.GetSubsceneLayerId(subscene, "default")
bool layerLocked = api.IsEntityLayerLocked(subscene, layerId)
bool hierarchyLocked = api.IsEntityLayerLockedHierarchy(subscene, layerId)
Could you clarify the intended relationship between:
the lock icon/state displayed for a subscene or its parent container in the World Editor hierarchy; and
IsEntityLayerLocked / IsEntityLayerLockedHierarchy for layers resolved through GetSubsceneLayerId?
Specifically: if a parent UI entry is visually locked but the default layer within the loaded subscene is editable, is it expected that both API methods return false for that subscene’s default layer?
We want to reliably determine the target layer for entity placement without treating the visual lock of an outer subscene container as a lock on its editable internal default layer.