Actor

Audio - 音频

class ATest : public AActor
{
public:
    FOnAkPostEventCallback OnAkPostEventDelegate;

    virtual void BeginPlay() override;
    virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
    
    UFUNCTION()
    void OnAkPostEventCallback(EAkCallbackType CallbackType, UAkCallbackInfo* CallbackInfo);

    void LetWwiseSpeakSomething(AActor* Actor, UAkAudioEvent* AkEvent);
};

void ATest::BeginPlay()
{
    OnAkPostEventDelegate.BindDynamic(this, &ATest::OnAkPostEventCallback);
}

void ATest::EndPlay(const EEndPlayReason::Type EndPlayReason)
{
    OnAkPostEventDelegate.Clear();
}

void ATest::LetWwiseSpeakSomething(AActor* Actor, UAkAudioEvent* AkEvent)
{
    UAkGameplayStatics::PostEvent(AkEvent, Actor, AK_EndOfEvent, OnAkPostEventDelegate);
}

Blueprint - 蓝图

Camera - 相机

CDO

Compileing

Collision

  • 有时两个体型差别巨大的Pawn之间因为避障而出现奇怪的碰撞(小个子不能从大个子缝隙间通过等等),可以通过关闭RVOAvoidance来解决
    • 更好的方法应该是给大家分到合理的Group里面
  • LineTrace为什么没有返回PhysicalMatertial
    • 需要设置CollisionQueryParams

Crash

#pragma warning(push)
#pragma warning(disable : 4250)

Debug

在main函数里面,然后给b++这个打个断点
static int b =0;
while(true)
{
     b++;
}

Input

EnhancedInputComponent->BindAction<AMyClass, bool>(IA_A, ETriggerEvent::Triggered, this, &AMyClass::DoIt, true);
void AMyClass::DoIt(const FInputActionValue& Value, bool bMyCustomParameter) {}

Interface

Json

FString OutputString;
TSharedRef< TJsonWriter<> > Writer = TJsonWriterFactory<>::Create(&OutputString);
FJsonSerializer::Serialize(JsonObject.ToSharedRef(), Writer);

UE_LOG(LogTemp, Warning, TEXT("resulting jsonString -> %s"), *OutputString);

Level

Localization

Log

Math

Sequence

Streaming

Slate

  • [怎么动态改变slot数量]
    • 建议给Slot里面的Widget的Visisbility属性绑定函数,在函数中根据当前状态返回不同值

Tools

UI