예제 #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)));
        }
예제 #2
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)));
        }