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?
private void UpdateTime()
{
time = TimeControl.CurrentTime.ToString("hh:mm tt");
}
Ehm, I think the problem starts with that TimeControl isn't in the scripting reference. What library are you using?
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.
Ehm, I think the problem starts with that TimeControl isn't in the scripting reference. What library are you using?
– anon73820239You might have to show us the TimeControl script. Its hard to tell without it.
– anon52845587Have 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.
– by0log1c