目录 目录 目录 Runtime PostConfigInit Voxel
目录 Voxel依赖:
引擎类: "Core", "CoreUObject","Engine"
,"TraceLog"
,"DeveloperSettings"
,"Projects"
网络类: "Networking", "Sockets","HTTP","zlib"
3D图形: "RHI", "RenderCore",
"nvTessLib",
"ForsythTriOptimizer"
2D图形: "Slate", "SlateCore"
地形: "Landscape"
物理碰撞: "PhysX","PhysicsCore"
build.cs 使用了
SetupModulePhysicsSupport(Target); //物理碰撞
PublicDefinitions.Add("VOXEL_DEBUG=1");
PublicDefinitions.Add("VOXEL_PLUGIN_NAME=TEXT(\"VoxelFree\")");
进入Module内文件 250个.h ,150个.cpp
001插件启动类
Voxel.Build.cs C#编译引导
VoxelModule.h 模组名:IModuleInterface :{ StartupModule(), ShutdownModule() }
VoxelModule.cpp
启动步骤依次为
VoxelValue.h 会有一个编译自检int8/int16对float的转换
打印debug状态 1/0
材质数据校对 //FVoxelMaterial
压缩/解压校对 //FVoxelSerializationUtilities
将VoxelFree重新定位到Voxel
等待下一帧 //FTicker::GetCoreTicker().AddTicker(FTickerDelegate::CreateLambda([=](float){//doSomething;return false;}));
获得当前版本号
int32 VoxelPluginVersion = 0;
GConfig->GetInt(TEXT("VoxelPlugin"), TEXT("VoxelPluginVersion"), VoxelPluginVersion, GEditorPerProjectIni);
如果小于当前版本,就提示去网址看说明书,可点击
const auto OpenLink = [=](const FString& Url)
{
FString Error;
FPlatformProcess::LaunchURL(*Url, nullptr, &Error);
if (!Error.IsEmpty())
{
FMessageDialog::Open(EAppMsgType::Ok, FText::FromString("Failed to open " + Url + "\n:" + Error));
}
};
FVoxelMessages::FNotification Notification;
Notification.UniqueId = OBJECT_LINE_ID();
Notification.Message = "Voxel Plugin has been updated to 1.2!";
Notification.Duration = 1e6f;
Notification.OnClose = FSimpleDelegate::CreateLambda(Close);
auto& Button = Notific