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


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

    1.WITH_EDITOR中的代码会被编译

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

    WITH_EDITOR和WITH_EDITORONLY_DATA的区别

    在论坛中找到的答案:

    1. WITH_EDITORONLY_DATA in headers for wrapping reflected members.
    2. WITH_EDITOR in CPP files for code.. Has nothing to do with reflection.

    意思就是:

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

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

    callineditor

    1. .h
    2. UFUNCTION(CallInEditor, Category = "Sky Creator|General")
    3. void SetEditorTimeOfDay(float NewValue);
    4. UFUNCTION(CallInEditor, Category = "Sky Creator|General")
    5. void SetEditorWeatherPreset(USkyCreatorWeatherPreset* NewValue);
    6. UFUNCTION(CallInEditor, Category = "Sky Creator|General")
    7. void SetEditorWeatherSettings(FSkyCreatorWeatherSettings NewValue);
    8. .cpp
    9. #define SKYCREATOR_DECLARE_SEQUENCER_SETFUNCTION_ANDUPDATE(MemberType, MemberName) void ASkyCreator::Set##MemberName(MemberType NewValue)\
    10. {\
    11. if (MemberName != NewValue)\
    12. {\
    13. MemberName = NewValue;\
    14. UpdateSettings();\
    15. }\
    16. }\
    17. SKYCREATOR_DECLARE_SEQUENCER_SETFUNCTION(float, EditorTimeOfDay);
    18. SKYCREATOR_DECLARE_SEQUENCER_SETFUNCTION_ANDUPDATE(USkyCreatorWeatherPreset*, EditorWeatherPreset);
    19. SKYCREATOR_DECLARE_SEQUENCER_SETFUNCTION(float, SunriseTime);
    20. SKYCREATOR_DECLARE_SEQUENCER_SETFUNCTION(float, SunsetTime);
    21. SKYCREATOR_DECLARE_SEQUENCER_SETFUNCTION(float, SunDawnOffsetTim

    1. //ue 5.2
    2. namespace EWorldType
    3. {
    4. enum Type
    5. {
    6. /** An untyped world, in most cases this will be the vestigial worlds of streamed in sub-levels */
    7. None,
    8. /** The game world */
    9. Game,
    10. /** A world being edited in the editor */
    11. Editor,
    12. /** A Play In Editor world */
    13. PIE,
    14. /** A preview world for an editor tool */
    15. EditorPreview,
    16. /** A preview world for a game */
    17. GamePreview,
    18. /** A minimal RPC world for a game */
    19. GameRPC,
    20. /** An editor world that was loaded but not currently being edited in the level editor */
    21. Inactive
    22. };
    23. }

  • 相关阅读:
    [附源码]java毕业设计游戏装备交易网站论文2022
    《寂寞歌唱》读后感
    P1113 杂务题解
    算法落地思考:如何让智能运维更智能
    mac磁盘工具显示未装载 磁盘读写速度慢的原因
    云服务器部署Neo4j
    Golang面试题五(GC)
    网友提问:HTML CSS JS很低级吗?
    无人驾驶与人工驾驶的对比,人工驾驶的优缺点
    cookie 里面都包含什么属性?
  • 原文地址:https://blog.csdn.net/opk8848/article/details/132622331