Revert previous checks, revert switch intend

This commit is contained in:
W2.Wizard
2021-02-21 19:48:23 +01:00
parent 35b687bf3d
commit 89734760fa
11 changed files with 123 additions and 110 deletions

View File

@@ -968,7 +968,8 @@ namespace FlaxEditor.Viewport
private void Spawn(ScriptType item, SceneGraphNode hit, ref Vector2 location, ref Vector3 hitLocation)
{
if (!(item.CreateInstance() is Actor actor))
var actor = item.CreateInstance() as Actor;
if (actor == null)
{
Editor.LogWarning("Failed to spawn actor of type " + item.TypeName);
return;