As of Unity 5.3.5 (the current version when I am writing this answer), WebGL builds do not support mobile devices.
If anything in a WebGL build works on a mobile device, you're just getting lucky.
it's testing whether the first bit changes when you subtract 1 from the input. the first bit represents whether the number is positive or negative, and that would only change if the input is 0.
I've spent the last ~4 hours trying to figure out how to intelligently use the same codebase (mostly) for this without using a separate make system for each OS
CMake seemed like a good option but I can't do per-platform, and SDL has different libraries per-platform
eh, depends what you're doing. gamedev and console programs are both relatively easy, but normal GUI programs are a nightmare in C++ even if you don't need to be cross-platform.
something like that. MSVC is set if it's generating files for VC++, otherwise I'm just assuming it's generating for gcc. (bad assumption, but it's simple and works for me right now, lol.)
@Pip that flag sets the "subsystem" to a windows application instead of a console one, so it won't automatically create a console. not sure if it's really needed or not...
I added that along with the "/ENTRY:mainCRTStartup" compiler flag so I could use main() instead of WinMain() without spawning a console. windows is annoying like that.
workflow...basically whenever I add a new file I rerun cmake, and whenever I add a new folder I modify CMakeLists.txt and then rerun it. modifying CMakeLists.txt wouldn't even be necessary if not for the source groups, but meh it's more annoying to not have the filters in visual studio.
cmake does run automatically in visual studio, but if you create a file using a file explorer, visual studio won't pick it up automatically, so it won't run cmake