-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Navigation] Restore 2D only navigation #88681
base: master
Are you sure you want to change the base?
Conversation
As mentioned there is no real 2D navigation server. The 2D server forwards and backwards all queries to the 3D server so you can not have a build with a disabled 3D server. If you try and it works it does because guards were added against crashes from missing e.g. 3D thirdparty libs but it will not be a true 3D disabled build because the 3D server needs to be included. |
True, but I'd say that's worth it to have a non "true" build, unless we want to accept the regression |
dc156bd
to
dc8046c
Compare
Following some discussion I'm going to look more into the specifics of this and test |
dc8046c
to
524900e
Compare
524900e
to
2f87612
Compare
Temporarily including these fixes to build template builds, the first commit isn't part of this commit: |
This is now ready for review, need testing to help with anything I've missed but it works correctly and tests fine, so should work perfectly assuming I haven't missed anything, removed some 3D only parts to reduce the size on 2D only builds Windows, debug build:
Windows, release build:
So this doesn't really come with any significant cost compared to default When comparing a 3D enabled build the difference in saving is about 13.7%/14.5% with this, and 14.2%/15.2% with the normal build, so the savings are still very significant (the savings drop by about 3.9%/4.3%), for release and debug respectively |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making these updates. Just a few questions.
I really would prefer to split the navobjects into 2d and 3d versions instead of having many new ifdef landmines in the code. That would require to give the NavigationServer2D some actual backbone. |
I can look at working on that, either in this or as a follow-up |
ad71dea
to
7ba06b1
Compare
b3d1ea1
to
c1ffb24
Compare
77865b6
to
59d5026
Compare
59d5026
to
c7a46ce
Compare
c7a46ce
to
4d6267b
Compare
4d6267b
to
7eed541
Compare
What is the state of this PR. Is the goal to just allow to compile the more optional 3D parts out to save a few bytes or is the intention to "restore" an actual 2D navigation. |
It restores 2D navigation, but doesn't separate out any 2D only code separate from the 3D elements, haven't gotten around to testing any such solution yet (though it reduces some of the unused code being compiled) But it works as advertised, 2D navigation will work in 3D-disabled builds (I've tested it in my own projects) |
7eed541
to
c4d2580
Compare
Starting in 4.2 navigation was restricted to 3D enabled builds only, in my testing this isn't an actual limitation, and my testing shows navigation works
(haven't tested baking in 2D, but pathfinding works fine, and unit tests work correctly)Edit: Tested and runtime baking works fine too