[SOLVED]ConfigVariableManager: making new variables

Does anyone know how to create a new config variable that could be read from a PRC file? The makeVariable method (listed on this manpage: http://panda3d.org/apiref.php?page=ConfigVariableManager#makeVariable) doesn’t actually seem to exist.

Take care,

That’s an internal method, not intended to be called by the user. I’m not sure why it appears in the generated docs page.

To make a new config variable, just create an instance of whatever type of config variable you need, e.g. ConfigVariableString(‘my-config-variable’, ‘default-value’). See this page in the manual.


Well, paint me green and call me Gumby. :slight_smile:

The method you describe wasn’t working earlier, but it works fine now. I must have opened the wrong PRC file when I was testing this earlier. Thank you for the help!