@@ -1140,7 +1140,12 @@ PyObject *py_unreal_engine_get_selected_assets(PyObject * self, PyObject * args)
11401140
11411141PyObject *py_unreal_engine_get_all_edited_assets (PyObject * self, PyObject * args)
11421142{
1143+ #if ENGINE_MINOR_VERSION >= 24
1144+ UAssetEditorSubsystem* AssetEditorSubsystem = GEditor->GetEditorSubsystem <UAssetEditorSubsystem>();
1145+ TArray<UObject *> assets = AssetEditorSubsystem->GetAllEditedAssets ();
1146+ #else
11431147 TArray<UObject *> assets = FAssetEditorManager::Get ().GetAllEditedAssets ();
1148+ #endif
11441149 PyObject *assets_list = PyList_New (0 );
11451150
11461151 for (UObject *asset : assets)
@@ -1168,7 +1173,12 @@ PyObject *py_unreal_engine_open_editor_for_asset(PyObject * self, PyObject * arg
11681173 if (!u_obj)
11691174 return PyErr_Format (PyExc_Exception, " argument is not a UObject" );
11701175
1176+ #if ENGINE_MINOR_VERSION >= 24
1177+ UAssetEditorSubsystem* AssetEditorSubsystem = GEditor->GetEditorSubsystem <UAssetEditorSubsystem>();
1178+ if (AssetEditorSubsystem->OpenEditorForAsset (u_obj))
1179+ #else
11711180 if (FAssetEditorManager::Get ().OpenEditorForAsset (u_obj))
1181+ #endif
11721182 {
11731183 Py_RETURN_TRUE;
11741184 }
@@ -1193,7 +1203,11 @@ PyObject *py_unreal_engine_find_editor_for_asset(PyObject * self, PyObject * arg
11931203 if (py_bool && PyObject_IsTrue (py_bool))
11941204 bFocus = true ;
11951205
1206+ #if ENGINE_MINOR_VERSION >= 24
1207+ IAssetEditorInstance* instance = GEditor->GetEditorSubsystem <UAssetEditorSubsystem>()->FindEditorForAsset (u_obj, bFocus);
1208+ #else
11961209 IAssetEditorInstance *instance = FAssetEditorManager::Get ().FindEditorForAsset (u_obj, bFocus);
1210+ #endif
11971211 if (!instance)
11981212 return PyErr_Format (PyExc_Exception, " no editor found for asset" );
11991213
@@ -1212,14 +1226,23 @@ PyObject *py_unreal_engine_close_editor_for_asset(PyObject * self, PyObject * ar
12121226 UObject *u_obj = ue_py_check_type<UObject>(py_obj);
12131227 if (!u_obj)
12141228 return PyErr_Format (PyExc_Exception, " argument is not a UObject" );
1229+
1230+ #if ENGINE_MINOR_VERSION >= 24
1231+ GEditor->GetEditorSubsystem <UAssetEditorSubsystem>()->CloseAllEditorsForAsset (u_obj);
1232+ #else
12151233 FAssetEditorManager::Get ().CloseAllEditorsForAsset (u_obj);
1234+ #endif
12161235
12171236 Py_RETURN_NONE;
12181237}
12191238
12201239PyObject *py_unreal_engine_close_all_asset_editors (PyObject * self, PyObject * args)
12211240{
1241+ #if ENGINE_MINOR_VERSION >= 24
1242+ GEditor->GetEditorSubsystem <UAssetEditorSubsystem>()->CloseAllAssetEditors ();
1243+ #else
12221244 FAssetEditorManager::Get ().CloseAllAssetEditors ();
1245+ #endif
12231246
12241247 Py_RETURN_NONE;
12251248}
@@ -1355,7 +1378,11 @@ PyObject *py_unreal_engine_reload_blueprint(PyObject * self, PyObject * args)
13551378 UBlueprint *reloaded_bp = nullptr ;
13561379
13571380 Py_BEGIN_ALLOW_THREADS
1358- reloaded_bp = FKismetEditorUtilities::ReloadBlueprint (bp);
1381+ #if ENGINE_MINOR_VERSION >= 24
1382+ reloaded_bp = FKismetEditorUtilities::ReplaceBlueprint (bp, bp);
1383+ #else
1384+ reloaded_bp = FKismetEditorUtilities::ReloadBlueprint (bp;
1385+ #endif
13591386 Py_END_ALLOW_THREADS
13601387
13611388 Py_RETURN_UOBJECT (reloaded_bp);
0 commit comments