More actor and UObject progress

This commit is contained in:
AeonLucid
2022-01-17 23:02:10 +01:00
parent fe97b7a145
commit 458bae0523
24 changed files with 421 additions and 18 deletions
+10 -1
View File
@@ -1,4 +1,6 @@
using Prospect.Unreal.Core;
using Prospect.Unreal.Core.Objects;
using Prospect.Unreal.Net;
using Prospect.Unreal.Net.Actors;
namespace Prospect.Unreal.Runtime;
@@ -8,6 +10,13 @@ public class UGameInstance
public AGameModeBase? CreateGameModeForURL(FUrl inUrl, UWorld inWorld)
{
// TODO: World.SpawnActor
return new AGameModeBase();
var spawnInfo = new FActorSpawnParameters
{
SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod.AlwaysSpawn,
ObjectFlags = EObjectFlags.RF_Transient
};
return inWorld.SpawnActor<AGameModeBase>(GUClassArray.StaticClass<AGameModeBase>(), spawnInfo);
}
}