Additional cleanup

Cleaned up some additional stuff that I found
This commit is contained in:
W2.Wizard
2021-02-21 18:17:35 +01:00
parent 8b3fc9842d
commit 35b687bf3d
21 changed files with 142 additions and 151 deletions

View File

@@ -690,8 +690,7 @@ namespace FlaxEditor.SceneGraph.GUI
var item = _dragActorType.Objects[i];
// Create actor
var actor = item.CreateInstance() as Actor;
if (actor == null)
if (!(item.CreateInstance() is Actor actor))
{
Editor.LogWarning("Failed to spawn actor of type " + item.TypeName);
continue;