Description
I had this problem recently where a user tried to use GGOV 2.3 (compiled with SHVDN 2.10.7) and crashed because GTA.UI.WorldToScreen(GTA.Math.Vector3) does not exists on 2.10.12.
Is present on the source file but is commented for some reason.
The text was updated successfully, but these errors were encountered:
Yes. It was impossible to implement that after porting the codebase to C#. So it is the one and only function that had to go. Fortunately there are very little scripts that make use of it.
Workaround was to only compile UI.cpp in C++/CLI and all the other source files in C#. This means however that UI.cpp cannot reference types defined in the C# codebase, which includes GTA.Math.Vector3. So it is not possible to define a function signature containing GTA.Math.Vector3 in there. But it's also not possible to just compile that in C#, since it is part of the GTA.UI class defined in C++/CLI and there cannot be multiple definitions of the same class. So I had to decide between leaving all functions in (inculding GTA.UI.WorldToScreen), but breaking all scripts that make use of GTA.UI.WIDTH and GTA.UI.HEIGHT, or making GTA.UI.WIDTH and GTA.UI.HEIGHT work, but removing GTA.UI.WorldToScreen in the process and breaking scripts that use that. A lot more scripts make use of GTA.UI.WIDTH and GTA.UI.HEIGHT, so I chose the latter.
justalemon commentedDec 24, 2019
Version
2.10.12
Description
I had this problem recently where a user tried to use GGOV 2.3 (compiled with SHVDN 2.10.7) and crashed because
GTA.UI.WorldToScreen(GTA.Math.Vector3)does not exists on 2.10.12.Is present on the source file but is commented for some reason.
The text was updated successfully, but these errors were encountered: