Unity3d獲得體系時光。本站提示廣大學習愛好者:(Unity3d獲得體系時光)文章只能為提供參考,不一定能成為您想要的結果。以下是Unity3d獲得體系時光正文
Unity是由Unity Technologies開辟的一個讓玩家輕松創立諸如三維視頻游戲、修建可視化、及時三維動畫等類型互動內容的多平台的綜合型游戲開辟對象,是一個周全整合的專業游戲引擎。Unity相似於Director,Blender game engine, Virtools 或 Torque Game Builder等應用交互的圖型化開辟情況為重要方法的軟件其編纂器運轉在Windows 和Mac OS X下,可宣布游戲至Windows、Mac、Wii、iPhone、Windows phone 8和Android平台。也能夠應用Unity web player插件宣布網頁游戲,支撐Mac和Windows的網頁閱讀。它的網頁播放器也被Mac widgets所支撐。
上面經由過程一段代碼給年夜家引見unity3d獲得體系時光。
詳細代碼以下所示:
var gSkin:GUISkin; var str=""; var Months:String[]=["一月","二月","三月","四月","蒲月","六月","七月","八月","九月","十月","十一月","十二月"]; var Days:String[]= ["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20", "21","22","23","24","25","26","27","28","29","30","31"]; var dNow:System.DateTime; var i=0; function OnGUI() {if(gSkin)GUI.skin=gSkin; GUILayout.Box("當地日期時光:"+System.DateTime.Now);//當地時光,12小時制的 GUILayout.Box("軍事日期時光:"+System.DateTime.Now.ToString("yyyyMMddHHmmss")); GUILayout.Box("UTC日期時光:"+System.DateTime.UtcNow);//UTC時光 GUILayout.SelectionGrid(System.DateTime.Now.Month-1,Months,3); GUILayout.SelectionGrid(System.DateTime.Now.Day-1,Days,10); GUILayout.Box(str+dNow.Now.Year+"年"+dNow.Now.Month+"月"+dNow.Now.Day+" 日"+" "+dNow.Now.Hour+"時"+dNow.Now.Minute+"分"+dNow.Now.Second+"秒"); }
以上代碼就是關於Unity3d獲得體系時光的全體內容,代碼附有正文,哪裡寫的欠好的處所迎接列位年夜俠提出名貴看法。感謝。