基于UKismetSystemLibrary

PrintString

/**
* Prints a string to the log, and optionally, to the screen
* If Print To Log is true, it will be visible in the Output Log window. Otherwise it will be logged only as 'Verbose', so it generally won't show up.
*/
UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject", CallableWithoutWorldContext, Keywords = "log print", AdvancedDisplay = "2", DevelopmentOnly), Category="Utilities|String")
static void PrintString(const UObject* WorldContextObject, const FString& InString = FString(TEXT("Hello")), bool bPrintToScreen = true, bool bPrintToLog = true, FLinearColor TextColor = FLinearColor(0.0, 0.66, 1.0), float Duration = 2.f); /**
* Prints text to the log, and optionally, to the screen
* If Print To Log is true, it will be visible in the Output Log window. Otherwise it will be logged only as 'Verbose', so it generally won't show up.
*/
UFUNCTION(BlueprintCallable, meta=(WorldContext="WorldContextObject", CallableWithoutWorldContext, Keywords = "log", AdvancedDisplay = "2", DevelopmentOnly), Category="Utilities|Text")
static void PrintText(const UObject* WorldContextObject, const FText InText = INVTEXT("Hello"), bool bPrintToScreen = true, bool bPrintToLog = true, FLinearColor TextColor = FLinearColor(0.0, 0.66, 1.0), float Duration = 2.f); /**
* Prints a warning string to the log and the screen. Meant to be used as a way to inform the user that they misused the node.
* WARNING!! Don't change the signature of this function without fixing up all nodes using it in the compiler
* @param InString The string to log out
*/
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "TRUE"))
static void PrintWarning(const FString& InString);

Delay

/**
* Perform a latent action with a delay (specified in seconds). Calling again while it is counting down will be ignored.
*/
UFUNCTION(BlueprintCallable, Category="Utilities|FlowControl", meta=(Latent, WorldContext="WorldContextObject", LatentInfo="LatentInfo", Duration="0.2", Keywords="sleep"))
static void Delay(const UObject* WorldContextObject, float Duration, struct FLatentActionInfo LatentInfo ); /**
* Perform a latent action with a retriggerable delay (specified in seconds). Calling again while it is counting down will reset the countdown to Duration.
*/
UFUNCTION(BlueprintCallable, meta=(Latent, LatentInfo="LatentInfo", WorldContext="WorldContextObject", Duration="0.2", Keywords="sleep"), Category="Utilities|FlowControl")
static void RetriggerableDelay(const UObject* WorldContextObject, float Duration, FLatentActionInfo LatentInfo);

ConsoleCommand

  • ConsoleCommand

    GetWorld()->GetFirstPlayerController()->ConsoleCommand(TEXT("Quit"));
  • ExecuteConsoleCommand

    /**
    * Executes a console command, optionally on a specific controller
    */
    UFUNCTION(BlueprintCallable, Category="Development",meta=(WorldContext="WorldContextObject"))
    static void ExecuteConsoleCommand(const UObject* WorldContextObject, const FString& Command, class APlayerController* SpecificPlayer = NULL );
  • 其他

    /**
    * Attempts to retrieve the value of the specified float console variable, if it exists.
    */
    UFUNCTION(BlueprintCallable, Category="Development")
    static float GetConsoleVariableFloatValue(const FString& VariableName); /**
    * Attempts to retrieve the value of the specified integer console variable, if it exists.
    */
    UFUNCTION(BlueprintCallable, Category="Development")
    static int32 GetConsoleVariableIntValue(const FString& VariableName); /**
    * Evaluates, if it exists, whether the specified integer console variable has a non-zero value (true) or not (false).
    */
    UFUNCTION(BlueprintCallable, Category="Development")
    static bool GetConsoleVariableBoolValue(const FString& VariableName);

【UE4 C++】Print、Delay、ConsoleCommand的更多相关文章

  1. 【UE4 C++】 外部图片读取、Texture 保存 png

    蓝图版 导入外部图片 file://E:/UE___Projects_Test/MyProjectAAA/Plugins/WXimage.jpg 导出图图片 一般导出 .hdr 文件 导出 png 设 ...

  2. 【UE4 C++】简单获取名称、状态、时间、帧数、路径与FPaths

    基于UKismetSystemLibrary 获取各类名称 // Returns the actual object name. UFUNCTION(BlueprintPure, Category = ...

  3. 【Unity Shader】---常用帮助函数、结构体和全局变量

    [Unity Shader]---常用帮助函数.结构体和全局变量 一.内置包含文件 Unity中有类似于C++的包含文件.cginc,在编写Shader时我们可以使用#include指令把这些文件包含 ...

  4. 【python图像处理】图像的缩放、旋转与翻转

    [python图像处理]图像的缩放.旋转与翻转 图像的几何变换,如缩放.旋转和翻转等,在图像处理中扮演着重要的角色,python中的Image类分别提供了这些操作的接口函数,下面进行逐一介绍. 1.图 ...

  5. 【知识点整理】Oracle中NOLOGGING、APPEND、ARCHIVE和PARALLEL下,REDO、UNDO和执行速度的比较

    [知识点整理]Oracle中NOLOGGING.APPEND.ARCHIVE和PARALLEL下,REDO.UNDO和执行速度的比较 1  BLOG文档结构图 2  前言部分 2.1  导读和注意事项 ...

  6. 第04项目:淘淘商城(SpringMVC+Spring+Mybatis)【第十二天】(系统架构讲解、nginx)

    https://pan.baidu.com/s/1bptYGAb#list/path=%2F&parentPath=%2Fsharelink389619878-229862621083040 ...

  7. 第04项目:淘淘商城(SpringMVC+Spring+Mybatis)【第八天】(solr服务器搭建、搜索功能实现)

    https://pan.baidu.com/s/1bptYGAb#list/path=%2F&parentPath=%2Fsharelink389619878-229862621083040 ...

  8. 【PHP数据结构】交换排序:冒泡、快排

    上篇文章中我们好好地学习了一下插入类相关的两个排序,不过,和交换类的排序对比的话,它们真的只是弟弟.甚至可以说,在所有的排序算法中,最出名的两个排序都在今天要介绍的交换排序中了.不管是冒泡.还是快排, ...

  9. 【Cloud Computing】Hadoop环境安装、基本命令及MapReduce字数统计程序

    [Cloud Computing]Hadoop环境安装.基本命令及MapReduce字数统计程序 1.虚拟机准备 1.1 模板机器配置 1.1.1 主机配置 IP地址:在学校校园网Wifi下连接下 V ...

随机推荐

  1. (一)Superset 1.3图表篇——Table

    本系列文章基于Superset 1.3.0版本.1.3.0版本目前支持分布,趋势,地理等等类型共59张图表.本次1.3版本的更新图表有了一些新的变化,而之前也一直没有做过非常细致的图表教程. 而且目前 ...

  2. 20210716考试-NOIP19

    u,v,w. 这场考过. T1 u 差分裸题 #include<bits/stdc++.h> using namespace std; const int N=5000; int n,m; ...

  3. ICCV2021 | MicroNet:以极低的 FLOPs 改进图像识别

    ​前言:这篇论文旨在以极低的计算成本解决性能大幅下降的问题.提出了微分解卷积,将卷积矩阵分解为低秩矩阵,将稀疏连接整合到卷积中.提出了一个新的动态激活函数-- Dynamic Shift Max,通过 ...

  4. 微信小程序开发正常,真机预览模式错误

    原因是开发时设置了不检查域名是否合法,去后台设置上就可以了

  5. Identity角色管理一(准备工作)

    因角色管理需要有用户才能进行(需要将用户从角色中添加,删除)故角色管理代码依托用户管理 只需在Startup服务中添加角色管理即可完成 public void ConfigureServices(IS ...

  6. npm 设置同时从多个包源加载包的方法

    随着前后端分离技术的发展成熟,越来越来越多的后台系统甚至前端系统采用前后端分离方式,在大型前后端分离系统中,前端往往包含大量的第三方js 包的引用,各个第三方包又可能依赖另外一个第三方包,因此急需要一 ...

  7. 知乎vscode插件修改和重新编译

    需求来源 vscode插件修改代码要怎样重新编译并安装到vscode中? 起源于我使用一个vscode插件,它可以在vscode中发布文章到知乎上,然后我修改了插件的部分源代码,希望在vscode中安 ...

  8. js判断移动端跳转

    <script type="text/javascript">if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) | ...

  9. jquery获取一个元素符合条件的第一个父元素

    closest jQuery 1.3新增.从元素本身开始,逐级向上级元素匹配,并返回最先匹配的元素.. closest会首先检查当前元素是否匹配,如果匹配则直接返回元素本身.如果不匹配则向上查找父元素 ...

  10. Centos 7 设置 SFTP

    近期要给服务器设置一个SFTP用户,可以上传删除修改的SFTP,但是禁止该用户SSH登录.这里记录下来 先升级 来源: https://blog.csdn.net/fenglailea/article ...