diff --git a/Source/Editor/Modules/ContentDatabaseModule.cs b/Source/Editor/Modules/ContentDatabaseModule.cs
index a7535d806..969317071 100644
--- a/Source/Editor/Modules/ContentDatabaseModule.cs
+++ b/Source/Editor/Modules/ContentDatabaseModule.cs
@@ -724,10 +724,10 @@ namespace FlaxEditor.Modules
///
/// The proxy type.
/// Should rebuild entire database after addition.
- public void AddProxy(ContentProxy proxy, bool rebuild = false)
+ public void AddProxy(ContentProxy proxy, bool rebuild = true)
{
Proxy.Insert(0, proxy);
- if(rebuild)
+ if (rebuild)
Rebuild();
}
@@ -735,16 +735,18 @@ namespace FlaxEditor.Modules
/// Removes the proxy.
///
/// The proxy type.
- public void RemoveProxy(ContentProxy proxy)
+ /// Should rebuild entire database after removal.
+ public void RemoveProxy(ContentProxy proxy, bool rebuild = true)
{
Proxy.Remove(proxy);
- Rebuild();
+ if (rebuild)
+ Rebuild();
}
///
/// Rebuilds the whole database (eg. when adding custom item types from plugin).
///
- /// True if rebuild num, otherwise will be scheduled for the next editor update (eg. to batch multiple rebuilds within a frame).
+ /// True if rebuild now, otherwise will be scheduled for the next editor update (eg. to batch multiple rebuilds within a frame).
public void Rebuild(bool immediate = false)
{
_rebuildFlag = true;
@@ -804,7 +806,7 @@ namespace FlaxEditor.Modules
for (int i = 0; i < children.Length; i++)
Dispose(children[i]);
}
-
+
item.ParentFolder = null;
folder.Node.Dispose();
}