【UE4 C++】Print、Delay、ConsoleCommand
基于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的更多相关文章
- 【UE4 C++】 外部图片读取、Texture 保存 png
蓝图版 导入外部图片 file://E:/UE___Projects_Test/MyProjectAAA/Plugins/WXimage.jpg 导出图图片 一般导出 .hdr 文件 导出 png 设 ...
- 【UE4 C++】简单获取名称、状态、时间、帧数、路径与FPaths
基于UKismetSystemLibrary 获取各类名称 // Returns the actual object name. UFUNCTION(BlueprintPure, Category = ...
- 【Unity Shader】---常用帮助函数、结构体和全局变量
[Unity Shader]---常用帮助函数.结构体和全局变量 一.内置包含文件 Unity中有类似于C++的包含文件.cginc,在编写Shader时我们可以使用#include指令把这些文件包含 ...
- 【python图像处理】图像的缩放、旋转与翻转
[python图像处理]图像的缩放.旋转与翻转 图像的几何变换,如缩放.旋转和翻转等,在图像处理中扮演着重要的角色,python中的Image类分别提供了这些操作的接口函数,下面进行逐一介绍. 1.图 ...
- 【知识点整理】Oracle中NOLOGGING、APPEND、ARCHIVE和PARALLEL下,REDO、UNDO和执行速度的比较
[知识点整理]Oracle中NOLOGGING.APPEND.ARCHIVE和PARALLEL下,REDO.UNDO和执行速度的比较 1 BLOG文档结构图 2 前言部分 2.1 导读和注意事项 ...
- 第04项目:淘淘商城(SpringMVC+Spring+Mybatis)【第十二天】(系统架构讲解、nginx)
https://pan.baidu.com/s/1bptYGAb#list/path=%2F&parentPath=%2Fsharelink389619878-229862621083040 ...
- 第04项目:淘淘商城(SpringMVC+Spring+Mybatis)【第八天】(solr服务器搭建、搜索功能实现)
https://pan.baidu.com/s/1bptYGAb#list/path=%2F&parentPath=%2Fsharelink389619878-229862621083040 ...
- 【PHP数据结构】交换排序:冒泡、快排
上篇文章中我们好好地学习了一下插入类相关的两个排序,不过,和交换类的排序对比的话,它们真的只是弟弟.甚至可以说,在所有的排序算法中,最出名的两个排序都在今天要介绍的交换排序中了.不管是冒泡.还是快排, ...
- 【Cloud Computing】Hadoop环境安装、基本命令及MapReduce字数统计程序
[Cloud Computing]Hadoop环境安装.基本命令及MapReduce字数统计程序 1.虚拟机准备 1.1 模板机器配置 1.1.1 主机配置 IP地址:在学校校园网Wifi下连接下 V ...
随机推荐
- 新来的前端小姐姐问:Vue路由history模式刷新页面出现404问题
摘要:vue-router 默认 hash 模式 -- 使用 URL 的 hash 来模拟一个完整的 URL,于是当 URL 改变时,页面不会重新加载. 本文分享自华为云社区<学习Vue Rou ...
- Linux - 设置帮助文件为中文
前言 当我们执行某个命令的 --h 或者 --help 时,默认输出的都是英文,接下来我们来说下如何将所有帮助文件显示成中文哦! 设置系统默认语言为中文 对应每个shell而言,重启后会变成英文,所 ...
- Linux find命令实例教程 15个find命令用法
除了在一个目录结构下查找文件这种基本的操作,你还可以用find命令实现一些实用的操作,使你的命令行之旅更加简易.本文将介绍15种无论是于新手还是老鸟都非常有用的Linux find命令.首先,在你的h ...
- 如何在线安全清理mysql慢日志
部门mysql数据库的服务器磁盘空间快满了,查看了下磁盘的慢日志,发现占了50多个g,百度了资料后删除成功,现在和大家分享下我清理的过程,或许有更好的办法. 1.首先连接进入mysql,查看慢日志的状 ...
- 九、Abp vNext 基础篇丨评论聚合功能
介绍 评论本来是要放到标签里面去讲的,但是因为上一章东西有点多了,我就没放进去,这一章单独拿出来,内容不多大家自己写写就可以,也算是对前面讲解的一个小练习吧. 相关注释我也加在代码上面了,大家看看代码 ...
- jquery动态生成dom(比如append)导致js事件无效
如果无效用这个方法: on() 方法在被选元素及子元素上添加一个或多个事件处理程序. <div id="zkdiv"> <input type="bu ...
- javascript LinkedList js 双向循环链表 Circular Linked List
javascript LinkedList: function Node(elem, prev, next) { this.elem = elem; this.prev = prev ? prev : ...
- javascript 继承 inheritance prototype
* Rectangle继承Shape function Shape() { this.x = 0; this.y = 0; } Shape.prototype.move = function(x, ...
- 使用php函数 json_encode ,数据存入mysql
$data = json_encode($array); // 过滤 $data = addslashes($data); // 插入数据库 $db->insert($table_name,ar ...
- Centos7.6安装python3.6.8
yum -y install bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel libffi-devel tk-devel ...