Jump to content

Comments in the config


Recommended Posts

Posted

I've just started learning the configuration, so far it's mostly been trial and error. I would like a comment to appear in the config next to the configurable parameters, but so far it is not working.

I thought it would work like this:

        private class ConfigData
        {
            public int BearPopulation { get; set; } // Number of bears per square kilometer
        }

But only this appears in the config:

{
  "BearPopulation": 2,
}

Is what I want being done somehow different, or is it impossible?

Posted (edited)

no its not . but what you can do is this

  
private class ConfigData
        {
            [JsonProperty(PropertyName = "Number of bears per square kilometer")] 
            public int BearPopulation { get; set; }
        }

and then your out put should look like this

{
  "Number of bears per square kilometer": 2,
}

Edited by NooBlet
  • Like 2
Posted
1 minute ago, NooBlet said:

no its not . but what you can do is this

  
private class ConfigData
        {
            [JsonProperty(PropertyName = "Number of bears per square kilometer")] 
            public int BearPopulation { get; set; }
        }

and then your out put should look like this

{
  "Number of bears per square kilometer": 2,
}

Ty, that'll be good too.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.4m
Total downloads
Customers
10.8k
Customers served
Files Sold
156.1k
Marketplace sales
Payments
3.3m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.