UE4/5 插件分拆 《第一季》运行时地形06 Voxel 结构解读

目录 目录 目录 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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值