ue5 小知识点 ue的world type,pie editor game

说明以该命令行模式启动游戏的前提下的两个问题:

1.WITH_EDITOR中的代码会被编译

2.由于没有在编辑器中(即没有打开虚幻编辑器),所以GIsEditor为false

WITH_EDITOR和WITH_EDITORONLY_DATA的区别

在论坛中找到的答案:

复制代码
WITH_EDITORONLY_DATA in headers for wrapping reflected members.
WITH_EDITOR in CPP files for code.. Has nothing to do with reflection.

意思就是:

头文件中使用WITH_EDITORONLY_DATA包装反射的成员。

在CPP文件的代码中使用WITH_EDITOR,与反射无关。

callineditor

cpp 复制代码
	
.h
    UFUNCTION(CallInEditor, Category = "Sky Creator|General")
	void SetEditorTimeOfDay(float NewValue);
	UFUNCTION(CallInEditor, Category = "Sky Creator|General")
	void SetEditorWeatherPreset(USkyCreatorWeatherPreset* NewValue);
	UFUNCTION(CallInEditor, Category = "Sky Creator|General")
	void SetEditorWeatherSettings(FSkyCreatorWeatherSettings NewValue);

.cpp


#define SKYCREATOR_DECLARE_SEQUENCER_SETFUNCTION_ANDUPDATE(MemberType, MemberName) void ASkyCreator::Set##MemberName(MemberType NewValue)\
{\
	if (MemberName != NewValue)\
	{\
		MemberName = NewValue;\
		UpdateSettings();\
	}\
}\

SKYCREATOR_DECLARE_SEQUENCER_SETFUNCTION(float, EditorTimeOfDay);
SKYCREATOR_DECLARE_SEQUENCER_SETFUNCTION_ANDUPDATE(USkyCreatorWeatherPreset*, EditorWeatherPreset);

SKYCREATOR_DECLARE_SEQUENCER_SETFUNCTION(float, SunriseTime);
SKYCREATOR_DECLARE_SEQUENCER_SETFUNCTION(float, SunsetTime);
SKYCREATOR_DECLARE_SEQUENCER_SETFUNCTION(float, SunDawnOffsetTim
cpp 复制代码
//ue 5.2
namespace EWorldType
{
	enum Type
	{
		/** An untyped world, in most cases this will be the vestigial worlds of streamed in sub-levels */
		None,

		/** The game world */
		Game,

		/** A world being edited in the editor */
		Editor,

		/** A Play In Editor world */
		PIE,

		/** A preview world for an editor tool */
		EditorPreview,

		/** A preview world for a game */
		GamePreview,

		/** A minimal RPC world for a game */
		GameRPC,

		/** An editor world that was loaded but not currently being edited in the level editor */
		Inactive
	};
}
相关推荐
AI视觉网奇2 天前
ue metahuman自动绑定实战
笔记·学习·ue5
AI视觉网奇2 天前
ue 安装报错MD-DL ue 安装笔记
笔记·学习·ue5
zhangzhangkeji2 天前
UE5 多线程(6):FQueuedThreadPool 的使用,peek 函数,
ue5
AI视觉网奇3 天前
ue 导出 fbx
笔记·学习·ue5
zhangzhangkeji3 天前
UE5 多线程(5-3):锁的智能指针版本 FScopeLock 与 FScopeUnlock。
ue5
菜鸟z级3 天前
ubuntu18.04+realsense d415+ur5手眼标定,眼在手上
ue5·机器人·相机
AI视觉网奇3 天前
ue5 绑定 鞋子 blender绑定
笔记·学习·ue5
哎呦哥哥和巨炮叔叔4 天前
虚幻引擎 5.5 能否取代 V-Ray?现代建筑可视化渲染技术对比解析
ue5·实时渲染·虚幻引擎5·建筑可视化·渲染101云渲染·v-ray渲染·建筑效果图
zhangzhangkeji4 天前
UE5 多线程(4):资源竞争与原子变量。UE 建议使用 STL版本的原子量,不用自己版本的原子量 TAtomic<T> 的实现了
ue5
AI视觉网奇4 天前
ue slot 插槽用法笔记
笔记·学习·ue5