Example #1
0
        public AActor SpawnActor(UClass unrealClass, ref FVector location, ref FRotator rotation, ref FActorSpawnParameters parameters)
        {
            FActorSpawnParametersInterop interopParams = new FActorSpawnParametersInterop()
            {
                Name          = parameters.Name,
                Template      = parameters.Template == null ? IntPtr.Zero : parameters.Template.Address,
                Owner         = parameters.Owner == null ? IntPtr.Zero : parameters.Owner.Address,
                Instigator    = parameters.Instigator == null ? IntPtr.Zero : parameters.Instigator.Address,
                OverrideLevel = parameters.OverrideLevel == null ? IntPtr.Zero : parameters.OverrideLevel.Address,
                SpawnCollisionHandlingOverride = parameters.SpawnCollisionHandlingOverride,
                PackedBools = parameters.PackedBools,
                ObjectFlags = parameters.ObjectFlags
            };

            return(GCHelper.Find <AActor>(Native_UWorld.SpawnActor(Address, unrealClass.Address, ref location, ref rotation, ref interopParams)));
        }
Example #2
0
 public T SpawnActor <T>(ref FVector location, ref FRotator rotation, ref FActorSpawnParametersInterop parameters) where T : AActor
 {
     return(SpawnActor(UClass.GetClass <T>(), ref location, ref rotation, ref parameters) as T);
 }
Example #3
0
        public AActor SpawnActor(UClass unrealClass, ref FVector location, ref FRotator rotation)
        {
            FActorSpawnParametersInterop parameters = default(FActorSpawnParametersInterop);

            return(GCHelper.Find <AActor>(Native_UWorld.SpawnActor(Address, unrealClass.Address, ref location, ref rotation, ref parameters)));
        }
Example #4
0
 public AActor SpawnActor(UClass unrealClass, FVector location, FRotator rotation, FActorSpawnParametersInterop parameters)
 {
     return(SpawnActor(unrealClass, ref location, ref rotation, ref parameters));
 }