question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nav: Replace the static class of constants with an actual configuration file

See original GitHub issue

Is the improvement related to a problem? Please describe.

Yeah, the problem is that, each time a user updates their nav package, the constants will be replaced. Users may well change these values, and then have them unknowingly replaced, which could cause hard-to-track-down bugs.

Describe the solution you’d prefer:

To override navigation settings at the user-level, there ought to be a configurable NavWorld and/or blob asset with reasonable defaults. This change will probably confuse preexisting users when they upgrade, but it’s for the best.

Describe alternatives or workarounds you’ve considered:

I don’t think the constants file has ever really been a good idea, honestly. I went with it at the beginning of this year because DOTS’ lack of maturity (at the time) precluded the suggested solutions above.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
reeseschultzcommented, Jan 6, 2021

The refactor is nearly done. It’s required some deviations from what was discussed above, but I think most people will be happy with the result. Only issue is that I’m noticing some agents getting stuck in the NavTerrainDemo. I need to do some testing to see what’s happening with that. It could be that a value got mixed around or something.

After that, I’ll create an override system in the demo code, not in the nav package, so that people can just easily copy-paste it or change it if forking this repo. Following that, an update to the docs. I’ll do one big commit for it all.

1reaction
reeseschultzcommented, Jan 6, 2021

Thanks, and you’re welcome. I’ll let you know when this is done.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Accessing Constants Static Class That References App ...
See ConfigurationManager.AppSettings Caching, to remove any. Second the issue is most likely that Static field initialization does not work how ...
Read more >
Is it a good practice to store constants in configuration files
I want to structure the application in a way that non-developers can change these values if it is necessary. Yes, the easiest way...
Read more >
Edit Static Class Config variables from editor
Hi all, i'm using a static class with static public variables for some ... editor settings which have no relevance for the actual...
Read more >
How to define constants in C# | Microsoft Learn
To define non-integral constants, one approach is to group them in a single static class named Constants . This will require that all ......
Read more >
Extract constant | IntelliJ IDEA Documentation
In the editor, select an expression or declaration of a variable you want to replace with a constant. · Press Ctrl Alt 0C...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found