[AssetLib] Fix crash in Web editor.
Add EditorAssetLibrary::is_available which always returns false in the Web editor and use it in EditorNode for detection.
This commit is contained in:
@ -2792,10 +2792,7 @@ ProjectManager::ProjectManager() {
|
||||
center_box->add_child(settings_hb);
|
||||
}
|
||||
|
||||
// Asset Library can't work on Web editor for now as most assets are sourced
|
||||
// directly from GitHub which does not set CORS.
|
||||
#ifndef JAVASCRIPT_ENABLED
|
||||
if (StreamPeerSSL::is_available()) {
|
||||
if (AssetLibraryEditorPlugin::is_available()) {
|
||||
asset_library = memnew(EditorAssetLibrary(true));
|
||||
asset_library->set_name(TTR("Asset Library Projects"));
|
||||
tabs->add_child(asset_library);
|
||||
@ -2803,7 +2800,6 @@ ProjectManager::ProjectManager() {
|
||||
} else {
|
||||
WARN_PRINT("Asset Library not available, as it requires SSL to work.");
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
// Dialogs
|
||||
|
||||
Reference in New Issue
Block a user