using HighlightingSystem;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/*
* 脚本使用文字颜色来判断目标是否达成
* 格式固定两行
*
*/
public class Test : MonoBehaviour
{
[Tooltip("录音")]
public Button RecodePen;
//切换开关的旋转状态
public int _SwitchChangerStep;
[Header("这里是需要变色的文字")]
public Text text1, text2;
#region 提示栏文字列表
static string[] t1 = new string[] {
"点击录音按钮",
"点击录音按钮",
"点击录音按钮"
};
static string[] t2 = new string[]
{
"点击A",
"点击B",
"点击C"
};
[Header("需要点击的目标物体")]
public GameObject[] TargetGameobject = new GameObject[t1.Length];
#endregion
public int step;
[Header("录音按钮")]
public Button RecodeSubmit;//这个当时做项目要每个环节都有个录音.做其他需求时可以去掉这个
private void OnEnable()
{
TargetGameobject[step].SetActive(true);
Debug.Log(string.Format(
自用工具 Unity 引导系统.点击目标物体后提示文字变色进入下一步
于 2022-07-25 08:49:35 首次发布
本文介绍如何在Unity游戏中实现点击目标物体后,相关文字提示变色,并以此作为引导玩家进行下一步操作的功能。通过该系统,可以提升用户体验并帮助玩家更好地理解游戏流程。
摘要由CSDN通过智能技术生成