[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:
parent
44516d1a5c
commit
0e504e4191
4 changed files with 19 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue