![]() ![]() Questions like, the answer to I now know, but were not anywhere in documentation when I last needed this. So if it was fully documented, it would be good too? Last game I did I saved the resolution settings to my own save, as I just didn't know any better. For example Screen.SetResolution says nothing about it storing it permanently on desktop platforms. I've tried to call the direct functions that the GetMonitorInfo aliases to (GetMonitorInfoA, GetMonitorInfoW) without any change in luck.ĭoes anyone have any idea why this call would fail just for IL2CPP builds, and what I could possibly do about it?Ĭlick to expand.Now Unity is doing "clever" things behind my back and there's no documentation about it that I can find beyond some forum posts so it feels like it's some old legacy behaviour. The handles provided to the callback, and subsequently to the failing function, seem to be legit (at least they're not 0), and the callback is in fact called as many times as the number of monitors. The call to the GetMonitorInfo fails, and the structs provided to it remain unfilled (I've checked). The first one was fairly easy to fix: The delegate needs to be a static function, and cannot be supplied anonymously like in the above code, and the static function implementing the delegate must have the MonoPInvokeCallback attribute with the type of the delegate declaration you need to do.Īfter that I ran into another problem. Click to expand.Hi, sorry to necro this, but since I still haven't found any support for doing this with Unity APIs, I've resorted to the above method, which works great in Mono. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |