Skip to content

basstal/UE4ProtobufPlugin

Repository files navigation

UE4ProtobufPlugin

Only support windows for now

Read excel data to UCLASS by Protobuf Message definition

Example

UPBLoaderSubsystem * PBLoader = GEngine->GetEngineSubsystem<UPBLoaderSubsystem>();
UMonsterConfigExcel * Excel = PBLoader->LoadExcel<UMonsterConfigExcel>();
if (Excel)
{
    const FMonsterConfig * MonsterConfigRow = Excel->Get(210705);
    if (MonsterConfigRow)
    {
        UE_LOG(LogTemp, Log, TEXT("MonsterConfigRow->aiRes : %s"), *(MonsterConfigRow->aiRes));
    }
    for(auto ExcelRow : Excel->Rows)
    {
        UE_LOG(LogTemp, Log, TEXT("ExcelRow.id : %d"), ExcelRow.id);
    }
}
UHeroUpgradeExcel * HeroUpgradeExcel = PBLoader->LoadExcel<UHeroUpgradeExcel>();
if (HeroUpgradeExcel)
{
    for (auto Row : HeroUpgradeExcel->Rows)
    {
        for (auto Attr : Row->attr)
        {
            UE_LOG(LogTemp, Log, TEXT("Attr->value : %f"), Attr->value);
        }
    }
}

About

protobuf & excel reader plugin for ue4

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published