Class JoinCodeFile
- Namespace
- Unity.Multiplayer.Core
The join-code hand-off between a server and the bots started beside it (UM-T57, -joincodefile): the server
writes each code it publishes, the bots poll for it. Written beside the file and moved into place, so a reader
never sees half a code.
public static class JoinCodeFile
- Inheritance
-
JoinCodeFile
- Inherited Members
Methods
TryRead(string, out string)
The code in path, once it exists and holds one; false (and null) before that, or while the
file is being replaced.
public static bool TryRead(string path, out string code)
Parameters
Returns
Write(string, string)
Writes code to path (creating its folder), replacing what was there.
public static void Write(string path, string code)
Parameters
Exceptions
- ArgumentException
pathorcodeis empty.- IOException
The file could not be written.