基于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. Django——Auth模块(用户认证模块)

    1.Auth模块简介 auth模块是对登录认证方法的一种封装,之前我们获取用户输入的用户名及密码后需要自己从user表里查询有没有用户名和密码符合的对象. 而有了auth模块之后就可以很轻松的去验证用 ...

  2. 前端路由原理之 hash 模式和 history 模式

    什么是路由? 个人理解路由就是浏览器 URL 和页面内容的一种映射关系. 比如你看到我这篇博客,博客的链接是一个 URL,而 URL 对应的就是我这篇博客的网页内容,这二者之间的映射关系就是路由. 其 ...

  3. Linux常用命令 - tail命令详解

    21篇测试必备的Linux常用命令,每天敲一篇,每次敲三遍,每月一循环,全都可记住!! https://www.cnblogs.com/poloyy/category/1672457.html 实时刷 ...

  4. JUnit5快速入门指南-2

    重复测试中容易产生的问题 //结果类 private static int result = 0; public static int count(int x) throws InterruptedE ...

  5. AntDesign VUE:上传组件图片/视频宽高、文件大小、image/video/pdf文件类型等限制(Promise、Boolean)

    文件大小限制 - Promise checkFileSize(file, rules) { return new Promise((resolve, reject) => { file.size ...

  6. 通过HttpURLConnection下载图片到本地--批量下载

    一.背景说明 这篇文章讲述的是批量下载附件,在上一篇文章中,介绍了下载单个附件(上一篇文章). 二.实现思路 主要的实现思路:创建文件夹->文件夹中创建需要下载的文件->压缩文件夹-> ...

  7. 洛谷P1308——单词统计

    https://www.luogu.org/problem/show?pid=1308 题目描述 一般的文本编辑器都有查找单词的功能,该功能可以快速定位特定单词在文章中的位置,有的还能统计出特定单词在 ...

  8. Django学习day11随堂笔记

    今日考题 """ 今日考题 1.简述自定义分页器的使用 2.forms组件是干什么用的,它的主要功能有哪些功能,你能否具体说说每个功能下都有哪些经常用到的方法及注意事项( ...

  9. 5ucms静态发布卡住解决办法

    找到admin/admin_createhtml.asp文件(admin目录为你的后台管理目录),讲下面这段代码删掉保存即可. <script language="JavaScript ...

  10. 用Python做了个奇奇怪怪的打篮球游戏

    一.前言 准备编写一个篮球游戏,运动员带球跑,跳起投篮.在每帧图片中包括运动员和篮球,使用多帧图片,实现运动员运球跑动的效果. 运动员运球跑动作每帧图形的宽和高可能不同,例如,跨一大步,和两腿并拢,其 ...