- Home /
Can we create new variables or properties from the inspector?
What I am doing is getting data from JSON file and in this Item class I am adding its properties one by one in the script.
public class Item {
[JsonProperty(PropertyName = "ID")]
public string id { get; set; }
[JsonProperty(PropertyName = "Name")]
public string name { get; set; }
}
It works fine. But I don't want to add all these properties again and again in the script when the data from JSON files changes. Is there a way that I can make only one generic property and use it to add more properties from the inspector? Like I can add property name in the inspector and it will generate another property inside script.
Please help me out. I really need to work this out.
Your answer
Follow this Question
Related Questions
Parsing multiple json files that are referencing each other 0 Answers
Multiple Cars not working 1 Answer
Save on FileStream using WriteLine 0 Answers
How do I hide methods from the animation event inspector window? 2 Answers
KeyNotFoundException: The given key was not present in the dictionary. 2 Answers