|
This tiny code just updates my gui with the correct ingame time. It compiles in Visual C# but Unity says that ToString doesn't have anything that takes only 1 argument when obviously it does! What's the deal here?
(comments are locked)
|
|
The overload of TimeSpan.ToString that takes a format string as an argument was not added until .NET 4.0. Unity's current version of Mono is effectively .NET 3.5. Crap! How can I format it correctly then?
Apr 24 '11 at 10:20 PM
WildBamaBoy
Solved----------
Apr 25 '11 at 12:54 AM
WildBamaBoy
Can you share with other people that stumble across this thread?
Jun 15 '11 at 04:16 AM
vxssmatty
(comments are locked)
|
|
Have you overridden ToString in your TimeControl class? "hh:mm tt" isn't any kind of standard string format. Okay maybe I'm just doing the formatting the wrong way... "CurrentTime = new TimeSpan(Hour, Minute, 0);" Is all that it really does. I want it to show time like "03:25 AM", I don't want seconds on there, so I tried that format...How can I do it right?
Apr 24 '11 at 07:45 PM
WildBamaBoy
(comments are locked)
|

Ehm, I think the problem starts with that TimeControl isn't in the scripting reference. What library are you using?
TimeControl is a class of my own, attached to my main camera.
You might have to show us the TimeControl script. Its hard to tell without it.
Have you tried passing different parameters? I'm honestly not familiar with them but I use the "f[0-9]" so it definitly can take one(1) argument.
TimeControl: http://pastebin.com/PFqNf5wa