BluePrint:
C++:
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #d12f1b }
span.s1 { color: #78492a }
span.s2 { }
#include "kismet/KismetMathLibrary.h" //这个类有一个方法可以获取一定范围内随机一点,用法: (GetWhereToSpawn() 返回boxComponent)
FVector ASpawnVolume::GetRandomPointToVolume() { FVector MeshOrigin = GetWhereToSpawn()->Bounds.Origin; FVector MeshExt = GetWhereToSpawn()->Bounds.BoxExtent; return UKismetMathLibrary::RandomPointInBoundingBox(MeshOrigin, MeshExt); }
#include "Engine.h"//打印内容到屏幕
GEngine->AddOnScreenDebugMessage(-1, 15.0f, FColor::Yellow, TEXT("Some debug message!"));
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000 }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #4f8187 }
p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; min-height: 13.0px }
span.s1 { color: #4f8187 }
span.s2 { }
span.s3 { color: #31595d }
span.s4 { color: #000000 }
span.s5 { color: #ba2da2 }
span.s6 { color: #703daa }
span.s7 { color: #3e1e81 }
时间: 2024-12-17 03:04:27