`
aigo
  • 浏览: 2539635 次
  • 性别: Icon_minigender_1
  • 来自: 宜昌
社区版块
存档分类
最新评论
文章列表
  常用的接口: TLockFreePointerListFIFO<T>:先进先出; TLockFreePointerListLIFO<T>:后进先出; TLockFreePointerListUnordered<T>:看注释是说这个List内部元素是无序的,但效率比前面两个更高。   注意:如果你的元素是一个指针,比如A* val,那么模版名只需要用A而不要用A*,比如:TLockFreePointerListFIFO<A>。也就是说其内部只能放指针,不像std那样把类的对象作为元素。   想看文档不如直接看源码吧,官方文档的 ...
UE4中如果在自己创建的FRunnable线程中取访问引擎相关的API,比如你想在非GameThread中创建UI,运行时UE4时会给assert错误: Assertion failed: IsInGameThread() [File:D:\BuildFarm\buildmachine_++UE4+Release-4.11\Engine\Source\Runtime\Slate\Public\Framework\Application\SlateApplication.h] [Line: 156]    如何跨线程开访问UE4的API? 看了两个帖子,都说只能搞个queue,自定义线 ...
  Profiler Tool Reference https://docs.unrealengine.com/latest/INT/Engine/Performance/Profiler/index.html   原文: https://www.unrealengine.com/zh-CN/blog/how-to-improve-game-thread-cpu-performance   您游戏中的帧频率是不是太低? 您了解为什么会发生这种现象吗? 这是不是由于您同时生成了太多敌人?还是由于某个特定敌人过于消耗系统资源? 是由于您设置了过多的视觉特效,还是由于您所设计的战斗系统 ...
原文作者:@玄冬Wong 转载请注明原文出处:http://aigo.iteye.com/blog/2296462 key world: std::shared_mutex、std::mutex、performance、benchmark、性能测试   shared_mutex的适用场景比较特殊:一个或多个读线程同时读取共享资源,且只有一个写线程来修改这个资源,这种情况下才能从shared_mutex获取性能优势。 cppreference文档 http://en.cppreference.com/w/cpp/thread/shared_mutex Shared mutexes ...
原文作者:@玄冬Wong 目的:在自定义的Widget初始化完毕后,获取其内部的button、combo等UMG组件的C++指针。   这里我们新建了一个C++类,LoginWidget,继承自UserWidget,然后新建了一个Widget蓝图LoginWidgetBP,继承自LoginWidget C++ class。我们想在这个LoginWidgetBP蓝图被实例化之后,获取这个UI蓝图内的各个UI组件。   UserWidget 有两个函数可以做初始化,一个是 bool Initialize();  一个是 void NativeConstruct();    第一种方 ...
  官方文档: Slate, Hello https://wiki.unrealengine.com/Slate,_Hello   Slate Widget Examples https://docs.unrealengine.com/latest/INT/Programming/Slate/Widgets/   Slate Tutorial https://forums.unrealengine.com/showthread.php?822-Slate-Tutorial  
  更新submodule的时候报错: submodule update error: pathspec  did not match any file(s) known to git.   原因不清楚,重新添加一次submodule就正常了,命令: git submodule add -f URL-of-submoudle path/of/submodule    
如果提交submodule的时候提示这个信息:Current HEAD Detached,说明submodule已经和远程仓库脱离开了,如果你submodule中有未提交的改动,一定要手动备份下。   然后在submodule所在的目录下,右键-》TortoiseGit-》switch/checkout-》Branch选择:Master,然后点击确定,然后再在当前submodule下进行编辑,这样就可以将改动的内容提交到远程仓库了。 如果主仓库下面有submodule,这些submodule默认是没有连接到master远程仓库的,需要手动switch。
UMG自带ComboBox组件没有提供直接的属性来修改其字体大小,只能自己做一个列表类型的widget然后再塞进ComboBox中,相当于从头定义一个类似combox的widget,当完全由你重新定义的时候,可以修改的不只是字体大小了。下面教程以修改字体大小为例:    图文教程 How do I set the font size of the UMG ComboBox (String)? https://answers.unrealengine.com/questions/126758/how-do-i-set-the-font-size-of-the-umg-combobox- ...
  Using Instanced Meshes doesn't reduce draw calls 原文:https://answers.unrealengine.com/questions/127435/using-instanced-meshes-doesnt-reduce-draw-calls.html   epic工程师的回答: Instanced meshes will reduce the draw call overhead on the CPU but will not reduce the GPU cost. In fact the GPU time can in ...
  命令行(按下波浪键)输入:stat SceneRendering   更多stat命令说明: Stat Commands https://docs.unrealengine.com/latest/INT/Engine/Performance/StatCommands/    
ue4工程编译时,如果只是将protobuf.lib链接进来,不加入protoc生成的代码,那么编译时没有问题的,但是如果加进来了,那么就跪了: error LNK2019: unresolved external symbol "public: __cdecl  。。。"   之前这个问题没想明白,以为可以通过设置工程来解决这个错误,后来想了想,protoc生成的代码都是标准c++代码,其头文件定义class的位置没有加入UE4工程的宏,比如:MyProject_API;另外cpp文件有没有包含工程的头文件,比如:#include "MyProject. ...
  使用FindProtobuf,可以不用手动执行protoc命令,nmake的时候自动去执行protoc,然后再编译链接生成静态库。如果proto文件之间有相互引用(使用了import),貌似会有问题,这个不知道当前版修复没,后面有空再测。   目录结构: /proto-build      |—— build/           #empty, used for cmake building      |—— include/               |—— google/      #protobuf headers      |—— proto/       ...
  How to run two commands in one line in Windows CMD? http://stackoverflow.com/questions/8055371/how-to-run-two-commands-in-one-line-in-windows-cmd   例子: cmd /c "echo foo & echo bar"    
  CMakeLists.txt中添加配置: add_custom_command   官方文档: https://cmake.org/cmake/help/v3.5/command/add_custom_command.html 参考: http://stackoverflow.com/questions/15115075/how-to-run-ctest-after-building-my-project-with-cmake    
Global site tag (gtag.js) - Google Analytics