You can insert both into your level - Sound Wav and Sound Cue.But you will have more power with a Sound Cue. Sound Wavis an imported sound file and very limited in what you can do with it. Sound Cueis an actor created in UE5 that uses one or more imported Sound Wav file. With ...
[UClass] public class ResourceBase : Actor, IInteractable { public ResourceBase() { SetReplicates(true); RespawnTime = 500.0f; } // The mesh of the resource [UProperty(DefaultComponent = true, RootComponent = true)] public StaticMeshComponent Mesh { get; set; } // The health component ...
(GMaxRHIFeatureLevel)->GetShader<FRayGenTestRGS>().GetRayTracingShader()); PSOInitializer.SetRayGenShaderTable(RayGenShaderTable); // Set ClosestHit shader TArray<FRHIRayTracingShader *> RayHitShaderTable; RayHitShaderTable.Add(GetGlobalShaderMap(GMaxRHIFeatureLevel)->GetShader<FRayGenTestCHS>()...
voidUMyLibrary::SpawnMyActor(UObject*Outer,TSubclassOf<AMyActor>ActorClass){autoObj=NewObject<AMyActor>(Outer,ActorClass);UE_LOG(LogTemp,Log,TEXT("[Chelsea]这一行纯粹为了断点"));} ActorClass 参数无论传入的是 MyActor 类还是 BP_MyActor 类;都会生成 UMyObject 和 UMyObjectWithInstanced 子对象。