Quick #UE4 Tip (第1周 2020.12.5)
Posted u010019717
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Quick #UE4 Tip (第1周 2020.12.5)相关的知识,希望对你有一定的参考价值。
选自过去1~2周 自己所看到外文内容:https://twitter.com/search?q=%23UE4&src=recent_search_click&f=live 和各种其他博客来源吧
Quick #UE4 Tip number 59.
Want to make sure you are casting to the right type? Use this C++ code snippet which will fail to compile if you cast incorrect type.
https://twitter.com/RyanJon2040/status/1335105371384532992
快速#UE4技巧第59。
是否要确保使用正确的类型? 使用此C ++代码段,如果您强制转换错误的类型,则该代码段将无法编译。
https://twitter.com/RyanJon2040/status/1334742983502155777
Quick #UE4 Tip number 58. Don't forget that #UnrealEngine has Print Text that does exactly what Print String do. I've seen people often converting Text to String for Print String.
快速#UE4提示第58。
不要忘记#UnrealEngine的“打印文本”功能与“打印字符串”功能完全相同。 我见过人们经常将文本转换为打印字符串的字符串。
Quick #UE4 Tip number 57. You want your 4.26 (or above) project to support Win32? You can by enabling Target 32bit option from Project Settings -> Windows.
https://twitter.com/RyanJon2040/status/1334380595602993156
快速#UE4提示第57。
您要您的4.26(或更高版本)项目支持Win32吗? 您可以通过从Project Settings -> Windows启用Target 32bit 选项。
Quick #UE4 Tip number 56. Having trouble playing sound from Media Player in UE4? Try enabling Native Audio Out from Project Settings -> Plugins -> WMF Media. Not all platforms are supported.
https://twitter.com/RyanJon2040/status/1334018207674470407
快速#UE4提示第56。
在UE4中播放Media Player的声音时遇到问题吗? 尝试从Project Settings -> Plugins -> WMF Media 启用Native Audio Out。 并非所有平台都受支持。
Quick #UE4 Tip number 55. Unable to select translucent actors from viewport (e.g: Mesh with glass material)? Make sure to enable Allow Translucent Selection.
https://twitter.com/RyanJon2040/status/1333655819703910406
快速#UE4提示第55。
无法从视口中选择半透明的actor(例如:玻璃材质的网格)? 确保启用“允许半透明选择”。快捷键是T。
Quick #UE4 Tip number 54. Need multi-line description for your
Plugin? Use "\\n" in your description.
https://twitter.com/RyanJon2040/status/1333293431876149250
快速#UE4提示第54。
需要多行描述
@虚幻引擎
Plugin? 在描述中使用“ \\ n”。
Quick #UE4 Tip number 53. Want to set a variable in a const function? Use "mutable" keyword for your variable. Example:
UPROPERTY() mutable int32 MyInteger; void SomeConstFunction() const MyInteger = 1;
https://twitter.com/RyanJon2040/status/1332931044031549442
快速#UE4提示第53。
是否想在const函数中设置变量? 使用“mutable”可变关键字作为变量。 例:
Quick #UE4 Tip number 52. Don't kow how your assets are referenced? Reference Viewer comes to your rescue. Right click on an asset and select reference viewer to see how your assets are linked.
https://twitter.com/RyanJon2040/status/1332568656501411841
快速#UE4提示第52。
不知道如何引用您的资产? Reference Viewer可以助您一臂之力。 右键单击资产,然后选择参考查看器以查看如何链接资产。
Quick #UE4 Tip number 51. Looking for a way to convert string to math expressions (eg: 12+34*(1/56)+(78-9)? Use FMath::Eval static method.
https://twitter.com/RyanJon2040/status/1332206268262526976
快速#UE4提示第51。
寻找一种将字符串转换为数学表达式的方法(例如:12 + 34 *(1/56)+(78-9)?使用FMath :: Eval静态方法。
Quick #UE4 Tip number 50. You can use RemoveSwap, RemoveAtSwap etc on an array for more efficient element removal. This does not preserve the order of elements though.
https://twitter.com/RyanJon2040/status/1331843880501866496
快速#UE4提示第50。
您可以在数组上使用RemoveSwap,RemoveAtSwap等,以更有效地删除元素。 但是,这不会保留元素的顺序。
Quick #UE4 Tip number 49. Want to pass variables as reference without const? Use UPARAM(ref)
https://twitter.com/RyanJon2040/status/1331481492640378880
快速#UE4技巧第49。
是否希望在不使用const的情况下将变量作为引用传递? 使用UPARAM(参考)
Quick #UE4 Tip number 48. Having trouble accessing non-const functions from a const type? Here is how you remove const.
https://twitter.com/RyanJon2040/status/1331119104649011201
快速#UE4提示第48。
无法从const类型访问非const函数吗? 这是删除const的方法。
Quick #UE4 Tip number 47. Want to get multiple types from a single function with return value? Use '&' in parameters.
https://twitter.com/RyanJon2040/status/1330756716917612544
快速#UE4提示第47。
是否想从具有返回值的单个函数中获取多种类型? 在参数中使用“&”。
Quick #UE4 Tip number 46. Pass TArray variables by reference instead of value which is expensive because of memory allocation and unnecessarily creates a new array.
https://twitter.com/RyanJon2040/status/1330394328947064832
快速#UE4提示第46。
通过引用传递TArray变量而不是值,由于内存分配而使TArray变量昂贵,并且不必要地创建新数组。 【注:看到这一条我不确认,感觉跟C#差别大了,没有&会产生新的数组?】
Quick #UE4 Tip number 45. Missing variable after copy pasting? Simply right click on the variable and select Create.
https://twitter.com/RyanJon2040/status/1330031941207265280
快速#UE4提示第45。
复制粘贴后缺少变量? 只需右键单击该变量,然后选择创建。
Quick #UE4 Tip number 44. In UE4 4.26 and above, you can copy function from one Blueprint to another.
https://twitter.com/RyanJon2040/status/1329669553220042752
快速#UE4提示第44。
在UE4 4.26及更高版本中,您可以将function从一个蓝图复制到另一个。
Quick #UE4 Tip number 43. You can convert Blueprint functions to events and events to functions. Functions with output parameters are not supported.
https://twitter.com/RyanJon2040/status/1329307165366992896
快速#UE4提示第43。
您可以将Blueprint函数转换为事件,将事件转换为函数。 不支持带有输出参数的函数。
Quick #UE4 Tip number 42. Want to access your private C++ variables in Blueprint? Use AllowPrivateAccess meta specifier.
https://twitter.com/RyanJon2040/status/1328944777681891328
快速#UE4提示第42。
是否想在Blueprint中访问您的私有C ++变量? 使用AllowPrivateAccess元说明符。
Quick #UE4 Tip number 41. Tired of deleting Binaries, Intermediate and *.sln of your C++ project? All hail #PowerShell and may this script save you time.
https://twitter.com/RyanJon2040/status/1328582389568827392
快速#UE4提示第41。
厌倦了删除C ++项目的Binaries,Intermediate和* .sln? 大家欢呼#PowerShell,并希望此脚本可以节省您的时间。
Quick #UE4 Tip number 40. Using inline boolean properties will help reduce clutter in details panel and makes it more readable.
https://twitter.com/RyanJon2040/status/1328220001837461504
快速#UE4提示第40。
使用内联布尔属性将有助于减少“详细信息”面板中的混乱,并使其更具可读性。
来自的提示@muitxer。 您可以将该条件用于多个变量,也可以覆盖CanEditChange。 EditCondition支持C ++之类的条件,例如“ bThis &&!bOther”
Quick #UE4 Tip number 39. You can use simple expressions in EditCondition meta in C++ to enable or disable properties.
https://twitter.com/RyanJon2040/status/1327857614114357248
快速#UE4提示第39。
您可以在C ++中的EditCondition meta中使用简单表达式来启用或禁用属性。
Quick #UE4 Tip number 38. Want to get your level (map) name in C++? Check out this code.
快速#UE4提示第38。
是否想在C ++中获得您的关卡(地图)名称? 查看此代码。
https://twitter.com/RyanJon2040/status/1327495226114658306
Quick #UE4 Tip number 37. You can use tooltip information from Content Browser and use it in search which results in powerful search features.
https://twitter.com/RyanJon2040/status/1327132838290919424
快速#UE4提示第37。
您可以使用内容浏览器中的工具提示信息并将其用于搜索中,从而获得强大的搜索功能。
https://docs.unrealengine.com/en-US/Engine/Content/Browser/AdvancedSearchSyntax/index.html
Quick #UE4 Tip number 36. Want to quickly increase/decrease the Content Browser Thumbnail scale? Hold "Ctrl" key and mouse wheel up to increase and mouse wheel down to decrease.
https://twitter.com/RyanJon2040/status/1326770450270216192
快速#UE4提示第36。
是否想快速增加/减少“内容浏览器缩略图”比例? 按住“ Ctrl”键,鼠标滚轮向上增大,鼠标滚轮向下减小。
Quick #UE4 Tip number 35. Hey #UnrealEngine Blueprint Wizard. Make use of Blueprint Bookmarks to quickly jump between graphs. This is not global though.
快速#UE4技巧第35.嘿#UnrealEngine蓝图向导,利用蓝图书签在图形之间快速跳转,但这不是全局的。
https://twitter.com/RyanJon2040/status/1326408062425444352
Quick #UE4 Tip number 34. Overriding events from parent Blueprint? Call the parent event (like Super:: calls in C++) by right clicking and selecting Add call to parent function.
Quick#UE4技巧第34.Overriding 父级蓝图中的事件?右键单击并选择“添加对父函数的调用”,以调用父事件(如C ++中的Super ::调用)。
https://twitter.com/RyanJon2040/status/1326045674631270401
Quick #UE4 Tip number 33. Want to disable compiling a certain node in Blueprint without breaking connection? Enable "Allow Explicit Impure Node Disabling" from Editor Preferences.
快速UE4技巧第33.想在不中断连接的情况下禁用蓝图中的某个节点编译吗?请从“编辑器首选项”中启用“Allow Explicit Impure Node Disabling”。
Select both nodes then press Q. If you right click you will get other alignment options. :)
选择两个节点,然后按Q。如果右键单击,您将获得其他对齐选项。
https://twitter.com/RyanJon2040/status/1325683286908133376
Quick #UE4 Tip number 32. Using "IsValid" nodes on object variables? Then make use of validated get node by right clicking on the variable and selecting "Convert to Validated Get"
快速#UE4提示第32。
在对象变量上使用“ IsValid”节点吗?然后通过右键单击变量并选择“Convert to Validated Get”来使用验证的get节点
https://twitter.com/RyanJon2040/status/1325320898929451008
Quick #UE4 Tip number 31. Having multiple game modes? Give them aliases so you can start them easily via commandline. Example: YourGameName.exe ?game=duos
快速#UE4提示第31。
有多种游戏模式吗?给它们起别名,以便您可以通过命令行轻松启动它们。
例如:YourGameName.exe?Game = duos
https://twitter.com/RyanJon2040/status/1324958510895964160
Quick #UE4 Tip number 30. Want to make a simple performance friendly cartoony ghost effect? Create this material graph. Pastebin: https://pastebin.com/YtmUtv8i
快速#UE4提示第30。
想要制作一个简单的性能友好的卡通鬼影效果?创建此材质图。
粘贴框:https://pastebin.com/YtmUtv8i
https://twitter.com/RyanJon2040/status/1324596123416354816
This is the result
Quick #UE4 Tip number 29. Too many branch nodes to select different stuff? Let me introduce Select node (works best with enum).
快速#UE4提示第29。
太多的分支节点无法选择不同的内容?让我介绍一下Select节点(最适合枚举)。
https://twitter.com/RyanJon2040/status/1324233735412215808
Quick #UE4 Tip number 28. Want to change the info in your exe? Change it in Project Settings -> Description.
快速#UE4提示第28。
想要在您的exe文件中更改信息吗?在Project Settings -> Description.中进行更改。
https://twitter.com/RyanJon2040/status/1323871347613683712
Quick #UE4 Tip number 27. (Shared by Nightmare489) Want to flip your booleans (ie: inverse of the boolean. True if false or false if true)? Use the NOT node like in this graph.
快速#UE4技巧第27。(由Nightmare489共享)
要翻转布尔值(即:布尔值的倒数。如果为false则为True,如果为true则为false)?像此图中那样使用NOT节点。
https://twitter.com/RyanJon2040/status/1323508959668391938
Quick #UE4 Tip number 26. (Shared by EvoPulseGaming) Go to your Engine/Binaries/Win64 folder and pin UnrealVersionSelector.exe to taskbar to quickly access or pin your projects.
快速#UE4提示第26。(由EvoPulseGaming共享)
转到您的Engine / Binaries / Win64文件夹,然后将UnrealVersionSelector.exe固定到任务栏以快速访问或固定您的项目。
https://twitter.com/RyanJon2040/status/1323146572008337413
Quick #UE4 Tip number 25. (Shared by EvoPulseGaming) Don't include special characters in replicated variable names (including actor components). It can screw up replication and might crash the game.
快速#UE4技巧第25。(由EvoPulseGaming共享)
在复制的变量名(包括actor组件)中不要包含特殊字符,否则会破坏复制并可能导致游戏崩溃。
https://twitter.com/RyanJon2040/status/1322784183845081091
Quick #UE4 Tip number 24. Making a top down game which requires isometric camera? Create an Actor Blueprint and recreate this graph. Pastebin: https://pastebin.com/G72ix0r2
快速#UE4提示第24。
制作需要等距摄像头isometric camera的自上而下的游戏?创建一个Actor蓝图并重新创建该图。
粘贴框:https://pastebin.com/G72ix0r2
https://twitter.com/RyanJon2040/status/1322421795912257536
相关提示,请使用https://blueprintue.com共享图表!
BlueprintUE
BlueprintUE.com是用于共享,渲染和评估Unreal Engine 4蓝图的工具。UE4是一种游戏引擎,它使用称为蓝图的可视脚本。
Quick #UE4 Tip number 23. Want to quickly zoom in or out in Editor Viewport? Press and hold right click and hold Z to zoom in or C to zoom out. Release right click to reset the view.
快速#UE4提示第23。
想要在“编辑器”视口Editor Viewport中快速放大或缩小吗?按住右键单击并按住Z可以放大,按C可以缩小。释放右键单击以重置视图。
https://twitter.com/RyanJon2040/status/1322059408151515136
Quick #UE4 Tip number 22. Looking for a way to delay execution by a single frame? Use Delay node with Duration set to 0.
快速#UE4提示第22。
寻找延迟单帧执行的方法吗?使用“Duration ”设置为0的“Delay ”节点。
https://twitter.com/RyanJon2040/status/1321697020294299649
评论: 哦,很高兴知道!我一直使用0.01秒,而在大多数情况下,这已经足够了。
该事件将立即在同一帧中执行。
Quick #UE4 Tip number 21. Want to deprecate your old function/event for new one? Use Deprecated property and message.
快速#UE4提示第21。
想要将旧function/event弃用为新function/event吗?请使用不推荐(Deprecated )使用的属性和消息。
https://twitter.com/RyanJon2040/status/1321334632441286658
Converted this https://shadertoy.com/view/wsscD4 to UE4 material editor. Get it from pastebin: https://pastebin.com/xjTFAyf9
https://twitter.com/RyanJon2040/status/1321124760219123712
Quick #UE4 Tip number 20. Tired of seeing default level thumbnail? Right click on it and select "Capture Thumbnail" from Asset Actions.
快速#UE4提示第20。
厌倦了看到默认级别的缩略图吗?右键单击它,然后从Asset Actions中选择“捕获缩略图”"Capture Thumbnail" 。
https://twitter.com/RyanJon2040/status/1320972244475088896
Quick #UE4 Tip number 19. Lots of custom made UMG Widgets and want to hide it from Palette? Define them in Widget Classes to Hide from Project Settings -> Widget Designer (Team)
快速#UE4提示第19。
很多自定义的UMG小部件,想要将其从面板中隐藏吗?在小部件类中定义它们以从Project Settings -> Widget Designer (Team)”中隐藏
https://twitter.com/RyanJon2040/status/1320609856580063232
Quick #UE4 Tip number 18. Cluttered Blueprint details panel? Hide unnecessary categories via Class Settings -> Hide Categories.
快速#UE4提示第18。
混乱的“蓝图”详细信息面板?通过Class Settings -> Hide Categories. 隐藏不必要的类别。
https://twitter.com/RyanJon2040/status/1320247468999602181
Quick #UE4 Tip number 17. Looking for data related to your textures, lighting and meshes? Check out Statistics tab from Window Menubar.
快速#UE4提示第17。
要查找与您的纹理,照明和网格相关的数据吗?请从“窗口”菜单栏Window Menubar中查看“统计信息Statistics ”选项卡。
https://twitter.com/RyanJon2040/status/1319885080807047169
Quick #UE4 Tip number 16. Are you a lighting artist? Then quickly add actors related to World Lighting via Environment Light Mixer tab (4.26 and above).
快速#UE4提示第16。
您是照明艺术家吗?然后通过“环境光混合器Environment Light Mixer”选项卡(4.26及更高版本)快速添加与世界照明有关的actors 。
https://twitter.com/RyanJon2040/status/1319522693050486784
Quick #UE4 Tip number 15. Want to know how your multiplayer game perform under saturated network? Try enabling network emulation.
快速#UE4提示第15。
想知道您的多人游戏在饱和网络下的性能吗?尝试启用网络仿真。
https://twitter.com/RyanJon2040/status/1319160305218428929
Quick #UE4 Tip number 14. Can't remember all the
console variables? Fear not young warrior (or old warrior). Click on Help -> Console Variables.
快速#UE4提示第14。
不记得了
@虚幻引擎
控制台变量?不要害怕年轻的战士(或老战士),单击Help -> Console Variables。
https://twitter.com/RyanJon2040/status/1318797917264674817
Quick #UE4 Tip number 13. Want to prevent your mobile game from locking the phone after some time of inactivity? Use Control Screensaver node (with Allow Screen Saver off).
快速#UE4提示第13。
要防止您的手机游戏在闲置一段时间后锁定手机,请使用“控制屏幕保护程序”节点(关闭“允许屏幕保护程序”)。
https://twitter.com/RyanJon2040/status/1318435529566744576
Quick #UE4 Tip number 12. Want to quickly add input event of a specific key? Right click on graph and search for Keyboard<space><YourKey> (eg: keyboard A)
快速#UE4提示第12。
要快速添加特定键的输入事件吗?右键单击图形并搜索Keyboard <space> <YourKey>
(例如:键盘A)
https://twitter.com/RyanJon2040/status/1318073141634060288
Quick #UE4 Tip number 11. Want to show an image from the internet in your beautiful HUD? Use Download Image and Set brush from Texture Dynamic nodes.
You can use Blueprints like shown on the screenshot.
https://twitter.com/RyanJon2040/status/1317710753915285504
快速#UE4提示第11。
想要在漂亮的HUD中显示来自互联网的图像吗?使用“下载图像并从Texture Dynamic”节点设置画笔。
您可以使用屏幕截图中所示的蓝图。
Quick #UE4 Tip number 10. Want to know which of your functions or variables are private, protected or public? Enable Show access specifier in My Blueprints tab.
快速#UE4提示第10。
是否想知道您的哪个函数或变量是私有的,受保护的或公共的?在“我的蓝图”选项卡中启用“显示访问说明符”。https://twitter.com/RyanJon2040/status/1317348365873467392
Quick #UE4 Tip number 9. Constantly moving/rotating your actors? Of course you do! So Enable Combined Translate/Rotate Widget and Enable 2D combined translate + rotate widget.
快速#UE4提示第9。
不断地移动/旋转actors是吗?当然可以!因此,启用组合平移/旋转小部件并启用2D组合平移/旋转小部件。
https://twitter.com/RyanJon2040/status/1316985977987076096
Quick #UE4 Tip number 8. Want to make a performance friendly bobbing effect? Use this material graph.
快速#UE4提示第8。
想要使演奏效果更动人吗?使用此材质图。
https://twitter.com/RyanJon2040/status/1316623590226366465
This is the result
注意原图有动画的
Quick #UE4 Tip number 7. Want to see variables from your parent class? Enable "Show Inherited Variables" from My Blueprint tab.
快速#UE4提示号7。
要查看您的父类中的变量吗?在“我的蓝图”选项卡中启用“显示继承的变量”。
https://twitter.com/RyanJon2040/status/1316261202280894465
Quick #UE4 Tip number 6. Want an easier way to get random items from an Array? Follow this method.
快速#UE4提示第6。
想要一种更简单的方法来从数组中获取随机项吗?
https://twitter.com/RyanJon2040/status/1315898814574800897
好的方法:)直到现在,我先使用Shuffle,然后得到0
Quick #UE4 Tip number 5. Making a game with fully dynamic lighting? Make sure to uncheck "Allow Static Lighting" and "Support Stationary Skylight".
快速#UE4提示第5。
要使用全动态照明制作游戏,请确保取消选中“允许静态照明Allow Static Lighting”和“支持固定天窗Support Stationary Skylight”。
https://twitter.com/RyanJon2040/status/1315536426549694465
Quick #UE4 Tip number 4. Prefer C++ names for your variables and functions? Uncheck "Show Friendly Variable Names" from Editor Preferences.
快速#UE4提示第4。
对于变量和函数,首选C ++名称吗?取消选中“编辑器首选项Editor Preferences”中的“显示友好的变量名Show Friendly Variable Names”。
https://twitter.com/RyanJon2040/status/1315174038726234114
Quick #UE4 Tip number 3. Editor is lagging when in background? Uncheck "Use Less CPU when in Background"
快速#UE4提示第3。
编辑器在后台时滞后吗?取消选中“Use Less CPU when in Background 在后台时使用更少的CPU”
https://twitter.com/RyanJon2040/status/1314811650759970816
你为什么想这么做?
有时,当您切换到另一个窗口或其他内容并返回到虚幻引擎时,它会挂起一秒钟,因此我总是禁用它。
Quick #UE4 Tip number 2. Developing mobile games? UsePlatform Game Instanceinstead of Game Instance to gett access to mobile specific delegates. See this: https://docs.unrealengine.com/en-US/API/Runtime/Engine/Kismet/UPlatformGameInstance/index.html…
快速#UE4提示第2。
要开发手机游戏,请使用手机平台游戏实例手机而不是游戏实例来访问特定于手机的代表,请参阅:https://docs.unrealengine.com/zh-CN/API/Runtime/Engine/Kismet/UPlatformGameInstance/index .html
Quick #UE4 Tip number 1. Quickly create your own #UnrealEngine GamePlay Effects by defining them in Gameplay Effect Parents via Project Settings. Requires Gameplay Abilities to be enabled.
快速#UE4技巧第1.通过Project Settings在Gameplay Effect Parents中定义它们来快速创建自己的#UnrealEngine GamePlay效果,需要启用游戏能力。
https://twitter.com/RyanJon2040/status/1295767385639489538
以上是关于Quick #UE4 Tip (第1周 2020.12.5)的主要内容,如果未能解决你的问题,请参考以下文章
Quick #UE4 Tip (第2周 2020.1.31)
Quick #UE4 Tip (第3周 2020.4.10)