Open a level sequence using python

I am trying to open the level sequencer editor. I have a level sequence at “/Game/myTest.myTest”.
Is there a way to get the asset at at this path.
i was trying to select the asset using this unreal.EditorAssetLibrary().sync_browser_to_objects([“/Game/myTest.myTest”])

Even though it selects the asset , when i do get selected asset, it returns empty list.
is there anyother way i could open the editor ?
this is my script:

import os
import unreal
unreal.EditorAssetLibrary().sync_browser_to_objects([“/Game/myTest.myTest”])

@unreal.uclass()
class selasset(unreal.GlobalEditorUtilityBase):
pass

sel = selasset().get_selected_assets()
unreal.AssetEditorSubsystem().open_editor_for_assets(sel)

This script works fine in ue4 editor console

Hello,

what about, in 4.26.2

import unreal

#get selection from the content browser
sel = unreal.EditorUtilityLibrary.get_selected_assets()
print(sel)

#load asset from path and add it to selection
sel.append(unreal.EditorAssetLibrary.load_asset("/game/NewLevelSequence"))

aes = unreal.get_editor_subsystem(unreal.AssetEditorSubsystem)
aes.open_editor_for_assets(sel)
2 Likes

Thanks a lot

There is also specific Helper Libraries available:

level_sequence("/Game/MyLevelSequence.MyLevelSequence")
unreal.LevelSequenceEditorBlueprintLibrary().open_level_sequence(level_sequence)