Unity(2018)でC#を用いています。
Textを変数daihonどうりに一文字ずつ表示させていくスクリプトを作っていて、
ある方から頂いたコードを参考にしてこのスクリプトを完成させたのですが
void Updateの3行目"Math"の所にエラーが出ます。
どう解決すればよろしいのでしょうか?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Message : MonoBehaviour {
public GameObject messagewindow = null;
string daihon = "成功しました";
int n = 0;
float t = 0f;
// Update is called once per frame
void Update()
{
t += Time.deltaTime;
n = Math.Floor(t * daihon.Length);//エラーはこの行のMathの部分です
string k = daihon.Substring(n);
Text messagewin = messagewindow.GetComponent<Text>();
messagewin.text = k;
}
}
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。