diff --git a/Source/Editor/Content/Thumbnails/ThumbnailsModule.cs b/Source/Editor/Content/Thumbnails/ThumbnailsModule.cs index a6996310e..fa289bb3d 100644 --- a/Source/Editor/Content/Thumbnails/ThumbnailsModule.cs +++ b/Source/Editor/Content/Thumbnails/ThumbnailsModule.cs @@ -368,7 +368,6 @@ namespace FlaxEditor.Content.Thumbnails // Create atlas if (PreviewsCache.Create(path)) { - // Error Editor.LogError("Failed to create thumbnails atlas."); return null; } @@ -377,7 +376,6 @@ namespace FlaxEditor.Content.Thumbnails var atlas = FlaxEngine.Content.LoadAsync(path); if (atlas == null) { - // Error Editor.LogError("Failed to load thumbnails atlas."); return null; } diff --git a/Source/Editor/Editor.cs b/Source/Editor/Editor.cs index 1a1fd3b2d..d46bf48ed 100644 --- a/Source/Editor/Editor.cs +++ b/Source/Editor/Editor.cs @@ -795,7 +795,6 @@ namespace FlaxEditor { if (projectFilePath == null || !File.Exists(projectFilePath)) { - // Error MessageBox.Show("Missing project"); return; } diff --git a/Source/Editor/Modules/ContentDatabaseModule.cs b/Source/Editor/Modules/ContentDatabaseModule.cs index ecafbf5d4..45428b9df 100644 --- a/Source/Editor/Modules/ContentDatabaseModule.cs +++ b/Source/Editor/Modules/ContentDatabaseModule.cs @@ -373,7 +373,6 @@ namespace FlaxEditor.Modules // Note: we use content backend because file may be in use or sth, it's safe if (FlaxEngine.Content.RenameAsset(oldPath, newPath)) { - // Error Editor.LogError(string.Format("Cannot rename asset \'{0}\' to \'{1}\'", oldPath, newPath)); return true; } @@ -387,7 +386,6 @@ namespace FlaxEditor.Modules } catch (Exception ex) { - // Error Editor.LogWarning(ex); Editor.LogError(string.Format("Cannot rename asset \'{0}\' to \'{1}\'", oldPath, newPath)); return true; @@ -418,7 +416,6 @@ namespace FlaxEditor.Modules } catch (Exception ex) { - // Error Editor.LogWarning(ex); Editor.LogError(string.Format("Cannot move folder \'{0}\' to \'{1}\'", oldPath, newPath)); return; @@ -479,7 +476,6 @@ namespace FlaxEditor.Modules if (item.IsFolder && Directory.Exists(newPath)) { - // Error MessageBox.Show("Cannot move folder. Target location already exists."); return; } @@ -489,7 +485,6 @@ namespace FlaxEditor.Modules var newParent = Find(newDirPath) as ContentFolder; if (newParent == null) { - // Error MessageBox.Show("Cannot move item. Missing target location."); return; } @@ -511,7 +506,6 @@ namespace FlaxEditor.Modules } catch (Exception ex) { - // Error Editor.LogWarning(ex); Editor.LogError(string.Format("Cannot move folder \'{0}\' to \'{1}\'", oldPath, newPath)); return; @@ -531,7 +525,6 @@ namespace FlaxEditor.Modules } catch (Exception ex) { - // Error Editor.LogWarning(ex); Editor.LogWarning(string.Format("Cannot remove folder \'{0}\'", oldPath)); return; @@ -566,7 +559,6 @@ namespace FlaxEditor.Modules { if (item == null || !item.Exists) { - // Error MessageBox.Show("Cannot move item. It's missing."); return; } @@ -590,7 +582,6 @@ namespace FlaxEditor.Modules } catch (Exception ex) { - // Error Editor.LogWarning(ex); Editor.LogError(string.Format("Cannot copy folder \'{0}\' to \'{1}\'", sourcePath, targetPath)); return; @@ -615,7 +606,6 @@ namespace FlaxEditor.Modules // Note: we use content backend because file may be in use or sth, it's safe if (Editor.ContentEditing.CloneAssetFile(sourcePath, targetPath, Guid.NewGuid())) { - // Error Editor.LogError(string.Format("Cannot copy asset \'{0}\' to \'{1}\'", sourcePath, targetPath)); return; } @@ -629,7 +619,6 @@ namespace FlaxEditor.Modules } catch (Exception ex) { - // Error Editor.LogWarning(ex); Editor.LogError(string.Format("Cannot copy asset \'{0}\' to \'{1}\'", sourcePath, targetPath)); return; @@ -680,7 +669,6 @@ namespace FlaxEditor.Modules } catch (Exception ex) { - // Error Editor.LogWarning(ex); Editor.LogWarning(string.Format("Cannot remove folder \'{0}\'", path)); return; diff --git a/Source/Editor/Windows/Assets/AnimationGraphWindow.cs b/Source/Editor/Windows/Assets/AnimationGraphWindow.cs index 622dfe066..12eac22b5 100644 --- a/Source/Editor/Windows/Assets/AnimationGraphWindow.cs +++ b/Source/Editor/Windows/Assets/AnimationGraphWindow.cs @@ -344,7 +344,6 @@ namespace FlaxEditor.Windows.Assets // Load surface graph if (_surface.Load()) { - // Error Editor.LogError("Failed to load animation graph surface."); return true; } diff --git a/Source/Editor/Windows/Assets/MaterialWindow.cs b/Source/Editor/Windows/Assets/MaterialWindow.cs index bb5765f50..6fbe32d7e 100644 --- a/Source/Editor/Windows/Assets/MaterialWindow.cs +++ b/Source/Editor/Windows/Assets/MaterialWindow.cs @@ -284,7 +284,6 @@ namespace FlaxEditor.Windows.Assets var mainNode = _surface.FindNode(1, 1) as Surface.Archetypes.Material.SurfaceNodeMaterial; if (mainNode == null) { - // Error Editor.LogError("Failed to find main material node."); } return mainNode; diff --git a/Source/Editor/Windows/Assets/ParticleEmitterWindow.cs b/Source/Editor/Windows/Assets/ParticleEmitterWindow.cs index b7c3ce786..f4fae5bdb 100644 --- a/Source/Editor/Windows/Assets/ParticleEmitterWindow.cs +++ b/Source/Editor/Windows/Assets/ParticleEmitterWindow.cs @@ -238,7 +238,6 @@ namespace FlaxEditor.Windows.Assets // Load surface graph if (_surface.Load()) { - // Error Editor.LogError("Failed to load Particle Emitter surface."); return true; } diff --git a/Source/Editor/Windows/Assets/VisualScriptWindow.cs b/Source/Editor/Windows/Assets/VisualScriptWindow.cs index 41293a4fe..63bde3c8a 100644 --- a/Source/Editor/Windows/Assets/VisualScriptWindow.cs +++ b/Source/Editor/Windows/Assets/VisualScriptWindow.cs @@ -1131,7 +1131,6 @@ namespace FlaxEditor.Windows.Assets // Save data to the asset if (_asset.SaveSurface(value, ref meta)) { - // Error _surface.MarkAsEdited(); Editor.LogError("Failed to save surface data"); } @@ -1192,7 +1191,6 @@ namespace FlaxEditor.Windows.Assets // Load surface graph if (_surface.Load()) { - // Error Editor.LogError("Failed to load Visual Script surface."); return true; } diff --git a/Source/Editor/Windows/ContentWindow.cs b/Source/Editor/Windows/ContentWindow.cs index f993b79f9..594692624 100644 --- a/Source/Editor/Windows/ContentWindow.cs +++ b/Source/Editor/Windows/ContentWindow.cs @@ -426,7 +426,6 @@ namespace FlaxEditor.Windows // Ensure has parent if (item.ParentFolder == null) { - // Error Editor.LogWarning("Cannot rename root items. " + item.Path); return; } diff --git a/Source/Engine/Content/Assets/VisualScript.cpp b/Source/Engine/Content/Assets/VisualScript.cpp index 66e393c98..6f0916e97 100644 --- a/Source/Engine/Content/Assets/VisualScript.cpp +++ b/Source/Engine/Content/Assets/VisualScript.cpp @@ -2163,18 +2163,16 @@ bool VisualScript::SaveSurface(const BytesContainer& data, const Metadata& meta) ReleaseChunk(i); // Set Visject Surface data - auto visjectSurfaceChunk = GetOrCreateChunk(0); - visjectSurfaceChunk->Data.Copy(data); + GetOrCreateChunk(0)->Data.Copy(data); // Set metadata - auto metadataChunk = GetOrCreateChunk(1); MemoryWriteStream metaStream(512); { metaStream.WriteInt32(1); metaStream.WriteString(meta.BaseTypename, 31); metaStream.WriteInt32((int32)meta.Flags); } - metadataChunk->Data.Copy(metaStream.GetHandle(), metaStream.GetPosition()); + GetOrCreateChunk(1)->Data.Copy(metaStream.GetHandle(), metaStream.GetPosition()); // Save AssetInitData assetData;