I’m looking for a way of settings some cvars at cook time for development builds only.
In particular I want to set these values:
r.ForceDebugViewModes=1
bAllowDebugViewmodes=True
These are because we want to be able to evaluate the buffer views on cooked builds and enabling these allow us to do that. We want to set these on the project level because we need them on for testing and are using CI to deliver builds to artists who are the main people to be using those debug views. So just having the artists enable these locally is not viable.
I don’t want these debug view modes getting into release cooked builds though so I’d like a way of setting these for Development builds only but I’m not sure how to do that.
Hello Calin,
I found this discussion from earlier in the year that may solve your issue, let me know if this helps!
Thanks,
Kyle B.
Sadly no, that thread goes more into the various ini placement. What I’m looking for is something to either add to or remove from the ini depending on whether we’re cooking a Development or Shipping build.
We could potentially do this on our build machines with the build script but I’m for something more wholistic so it will be set for everyone, including our build machines any time they cook a build and no matter if it’s done from command line or from the editor.
Hello Calin,
Here’s what I’ve found so far in further research into this topic:
- Overriding config parameters when cooking using UAT, which is unfortunately related to the build server and wouldn’t fit your specification exactly.
- This link, which states custom engine edits are required for overriding ini settings when packaging, which may be relevant for the cooking stage as well.
- An older thread which references the BasePakFileRules.ini, which could be worth looking at further. The user, however, mentions that files are stripped “post-cook” which I don’t believe suits your needs.
- And the Unreal docs on creating a Custom Launch Profile. This wouldn’t be an ideal solution, but wanted to include it for notations-sake.
I’ll be doing further research on this, but wanted to give you an update in the meantime to see if any combination of these threads would be useful to you. So far, I have not seen a be-all end-all approach to this; I’ll get back to you if I find anything else worth noting, and I’ll be asking my colleagues about this as well.
Let me know if any of that info helps!
Thanks,
Kyle B.
Thanks very much Kyle! Yeah the closest solution so far is doing to custom engine edits which is a possible but not ideal solution. We’re not directly opposed to engine edits (we already have some), but we’re trying to keep them minimal to make updates easier.
But if no other solutions exist, we’ll go with that.
As you stated, the other solutions don’t really hit the mark because they’re limited to either command line or post-cook.
Thanks again for digging into this.
Hello Calin,
Did a bit more research and asked my colleagues, seems like setting up custom builds in the Project - Packaging section is your best bet.
For example, the scalability.ini checks for custom builds and platforms, and it runs all on cvars, so your cvar ini would look something like:
[Build=CustomBuildType] r.ForceDebugViewModes=1
This does mean that you’ll need two different ini files for this, one for Development and one for Shipping.
If you want to edit the ini files at cook, the engine does do that with some of the base ini files so you could dig in further as to how they do it, but the config settings are designed in a way where you should never need to do that. Plus, then you get into custom engine edit territory which I know isn’t ideal.
(However if you did want to check that out, the EngineOverrides_Import.ini in the Lyra project is a good place to start, at the top it says “these are generated files, do not edit directly!”)
If you have any more questions please let me know, hope this helps out!
Thanks,
Kyle B.
Hello Calin,
Wanted to check-in to see if this helped solve your issue or if you needed any additional assistance?
Thanks,
Kyle B.