public void RemoveGameObject(ResizableObject gameObject)
{
var otherObject = LinkedGameObjects[gameObject.GameObject];
GameObjectEditor foundDoc = null;
foreach (var doc in EditorConsoleManager.OpenEditors)
if (doc is GameObjectEditor)
if (((GameObjectEditor)doc).GameObject == otherObject)
foundDoc = (GameObjectEditor)doc;
if (foundDoc != null)
{
EditorConsoleManager.RemoveEditor(foundDoc);
LinkedGameObjects.Remove(gameObject.GameObject);
Objects.Remove(gameObject);
}
}