Unity is a multi-platform comprehensive game development tool developed by Unity Technologies that allows players to easily create interactive content such as 3D video games, architectural visualization, real-time 3D animations, and is a comprehensive integrated professional game engine. Unity is similar to Director, Blender game engine, Virtools or Torque Game Builder software that uses interactive graphical development environments as the primary method, and its editor runs under Windows and Mac OS X, and can publish games to Windows, Mac, Wii, iPhone, Windows phone 8 and Android platforms. You can also use the Unity web player plug-in to publish web games, supporting web browsing for Mac and Windows. Its web player is also supported by Mac widgets.
The following is a code to introduce the unity3d to obtain the system time.
The specific code is as follows:
var gSkin:GUISkin; var str=""; var Months:String[]=["January","February","March","April","May","June","July","August","September","October","November","December"]; 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:; var i=0; function OnGUI() {if(gSkin)=gSkin; ("Local date and time:"+);//Local time, 12-hour time ("Military Date:"+("yyyyMMddHHmmss")); ("UTC date time:"+);//UTC time(-1,Months,3); (-1,Days,10); (str++"Year"++"moon"++" day"+" "++"hour"++"point"++"Second"); }
The above code is all about Unity3d getting the system time. The code is accompanied by comments. Welcome to give valuable suggestions from any bad writing. Thanks.