LoginSignup
5
7

More than 5 years have passed since last update.

現在時刻の取得方法

Posted at

System.DateTime.Now

void TimeStamp()
{
    HH = System.DateTime.Now.Hour.ToString();
    MM = System.DateTime.Now.Minute.ToString();
    SS = System.DateTime.Now.Second.ToString();

    Debug.Log(HH + ":" + MM+":"+ SS);

}

DeltaTimeで取得できなかったので、調べたら上記。System.DateTime.Now.XXXXXで現在の日時に関する値を取得できる。

5
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
7