打印屏幕

  • 默认打印屏幕

    // 打印至屏幕
    FString screenMessage = "(AddOnScreenDebugMessage) Hello world!";
    GEngine->AddOnScreenDebugMessage(-1, 1.f, FColor::Green, screenMessage); // 打印至屏幕
    UKismetSystemLibrary::PrintString(this, "(UKismetSystemLibrary::PrintString) Hello world!");

输出log

  • 默认类别打印log

    UE_LOG(LogTemp, Log, TEXT("(UE_LOG-logTemp)    Hello world!"));
  • 自定义类别打印log

    // .h 自定义日志分类
    DECLARE_LOG_CATEGORY_CLASS(GMDebugLog, Log, All); // .cpp 输出日志 自定义分类
    UE_LOG(GMDebugLog, Warning, TEXT("(UE_LOG-logTemp) Hello world!"));
    UE_LOG(GMDebugLog, Error, TEXT("(UE_LOG-GMDebugLog) Hello world!"));
  • 带变量打印log


    //创建FString 变量 FString::Printf
    FString playerName = "User";
    int32 healthValue = 100;
    FString outputMessage1 = FString::Printf(TEXT("Name is %s, health value is %d"), *playerName, healthValue);
    UE_LOG(LogTemp, Warning, TEXT("FStringFormatArg: %s"), *outputMessage1); //创建FString变量 FString::Format
    TArray<FStringFormatArg> args;
    args.Add(FStringFormatArg(playerName));
    args.Add(FStringFormatArg(healthValue)); FString outputMessage2 = FString::Format(TEXT("Name is {0}, health value is {1}"), args);
    UE_LOG(LogTemp, Warning, TEXT("FString::Format: %s"), *outputMessage2);

最新文章

  1. 今天写项目时,突然发现canvas的一些公式不记得了,所以整理了一番,分享给大家。
  2. Asp.net mvc5开源项目&quot;超级冷笑话&quot;
  3. JQ图片轮播
  4. jQuery设置disabled属性
  5. 开发一个jQuery插件——多级联动菜单
  6. Tinyxml的简单应用
  7. asp.net 分析器错误消息: 文件.aspx.cs”不存在错误
  8. pyshp操作shapefile
  9. [转] ICPC2013 World Finals赛后感
  10. SensorThread线程
  11. SWMM[Storm Water Management Model]模型代码编译调试环境设置
  12. Mongodb实用网址记录
  13. push控制器 卡顿
  14. IFeatureLayer
  15. 洛谷 [P1403] 约数研究
  16. 51 Nod 1242 斐波那契数列的第N项(矩阵快速幂模板题)
  17. JQ_开发经验
  18. Material Designer的低版本兼容实现(八)—— Flat Button
  19. elasticsearch6 学习之数据分片
  20. php安装完后配置php.ini和php-fpm.conf

热门文章

  1. leetcode 括号
  2. Spring(一)——概述
  3. XML解析——Jsoup解析器
  4. SprinBoot-SpringData-整合
  5. Redis——set,hash与列表
  6. elementUITable的多选框:分页选择数据回显,分页保存选中的数据。
  7. 【优化技术专题】「温故而知新」基于Quartz系列的任务调度框架的动态化任务实现分析
  8. python中reduce filter map lambda函数
  9. form表单提交失败
  10. Docker系列(21)- DockerFile介绍