技术栈

Unity 温度显示

痴冷暖2024-04-29 22:31

using System.Collections;

using System.Collections.Generic;

using TMPro;

using UnityEngine;

using UniRx;

public class OutsideTemperature : MonoBehaviour

{

SerializeField

private TextMeshProUGUI _temperature;

复制代码
private static readonly string TAG = "OutsideTemperature";
void Start()
{
    DataCenter.Temperature.Subscribe(i => {
    Log.I(TAG, "Temperature select value:  " + i);
        _temperature.text = Mathf.FloorToInt(i).ToString();
    }).AddTo(this);
}

}

上一篇:中学人工智能科创设计中心解决方案
下一篇:Linux的docker基础知识
相关推荐
狂人开飞机
13 分钟前
15、音频系统
游戏引擎·godot
狂人开飞机
1 小时前
16、粒子线条与视觉特效
游戏引擎·godot
心前阳光
12 小时前
Unity发布PC软件图标不能改变
unity·游戏引擎
an8695001
20 小时前
unity如何在visual studio中打断点debug
unity·游戏引擎·visual studio
xcLeigh
20 小时前
Unity基础:使用Transform控制物体移动——Translate与position详解
unity·游戏引擎
FairGuard手游加固
21 小时前
Unity小游戏加密:global-metadata.dat与AssetBundle保护
游戏·unity·游戏引擎
狂人开飞机
1 天前
11、UI系统
游戏引擎·godot
真鬼123
1 天前
【Unity AI】Untiy链接cursor与MCP
unity·游戏引擎
WarPigs
1 天前
Unity设置人物位置无效的原因
unity
程序员正茂
1 天前
Unity3d行为树Behavior Designer Pro
unity·行为树
热门推荐
01国内可直接用、免费额度/永久免费的大模型API清单(含 SiliconFlow、火山、阿里、智谱、百度、Kimi、DeepSeek、DMXAPI 等)02蜘蛛磁力 搜索引擎大全,如何使用蜘蛛磁力查找磁力链接03GitHub 镜像站点04历年考研数学一、数学二、数学三真题试卷及答案PDF05【一等奖版】2026 国赛 A题 药材的烘干问题06微信历史版本含下载地址( Windows PC | 安卓 | MAC )及设置微信不更新072026 国产 AI 大模型横评:DeepSeek、通义千问、Kimi、文心一言、星火、豆包谁更能打?08如何新建文件夹? 电脑新建文件夹的4种方法09ZCode 周末送额度活动开启:3 亿 Token 免费领取10Agnes AI 免费 API 接入指南:文本、生图、生视频,一套接口全免费