尝试一下代码高亮。。成功的话明天写一篇blog

using System;
using System.Collections;
using UnityEngine;

public class Time : MonoBehaviour
{
    // Use this for initialization
    private void Start()
    {
        Debug.Log(System.DateTime.Now);
        Debug.Log(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
        Debug.Log(System.DateTime.Now.Year
            + "-" + System.DateTime.Now.Month
            + "-" + System.DateTime.Now.Day
            + " " + System.DateTime.Now.Hour
            + ":" + System.DateTime.Now.Minute
            + ":" + System.DateTime.Now.Second);
    }

    // Update is called once per frame
    private void Update()
    {
    }
}
原文地址:https://www.cnblogs.com/fws94/p/6145568.html