diff --git a/Source/Engine/Level/Actor.cs b/Source/Engine/Level/Actor.cs index cd774fca6..76e95810f 100644 --- a/Source/Engine/Level/Actor.cs +++ b/Source/Engine/Level/Actor.cs @@ -125,7 +125,7 @@ namespace FlaxEngine { if (type.IsAbstract) return null; - + var result = (Actor)New(type); result.SetParent(this, false, false); return result; @@ -180,7 +180,7 @@ namespace FlaxEngine { if (typeof(T).IsAbstract) return null; - + result = New(); result.SetParent(this, false, false); } @@ -196,7 +196,7 @@ namespace FlaxEngine { if (type.IsAbstract) return null; - + var script = (Script)New(type); script.Parent = this; return script; @@ -211,7 +211,7 @@ namespace FlaxEngine { if (typeof(T).IsAbstract) return null; - + var script = New(); script.Parent = this; return script;