Loosen internal assertions further
Version 4.7
This update removes exception-throwing for a number of APIs, attempting to use sane fallbacks. wawa.IO
, wawa.Modules
, and wawa.TwitchPlays
are the only assemblies with any changes, public or internal. This library has been recompiled as version 4.7 just to keep Unity's assembly conflict problems away.
MINOR
wawa.IO
:
- Add optional parameters to
Wawa.IO.PathFinder.AssemblyLog
, more as a byproduct of the way the library requires it. The behavior of this function as such has been changed, with the format explicitly marking the method caller's name and log level for every use of this function. The method no longer guards null, as you are allowed to pass a null message. - All methods in
Wawa.IO.PathFinder
no longer throw. Error or warning messages will be logged as they arrive, and the library makes an attempt to continue execution with a few workarounds and fallbacks.
wawa.Modules
- Add overloads for
Wawa.Modules.ModdedModule.Log
andWawa.Modules.ModdedModule.LogLower
for people who use C# 6's string interpolation feature. This worked prior to Version 4.7, but had unnecessary additional overhead. Wawa.Modules.ModdedModule.Play
and similar no longer throw if you didn't have exactly oneKMAudio
instance. Instead, the error is simply logged, and the method prematurely returns, since this method is strictly side-effect based. Similar assertions exist inWawa.Modules.ModdedModule.Awake
, which also no longer throws.
PATCH
wawa.IO
:
- Remove undocumented requirements that Wawa.IO.PathFinder.GetFile expected the developer to fulfill, which made it an inconsistent API to work with. It should now behave normally.
- Improve logging for
Wawa.IO.PathFinder.GetDirectory
andWawa.IO.PathFinder.GetUnmanaged<T>
. - Micro-optimize mod id collecting to be negligibly faster.
wawa.TwitchPlays
:
- Uses appropriate log levels for editor-only assertions.
- No longer throws when no commands are found, however an error log is still produced.