• Breaking News

    Questions regarding Items, Unity C# So, i'm working on an Item system and I have a quick question in regards to Items. I typically use a set of Json files to hold my data which is fine except for Items which can different variables as they do different things. The issue is that i'm using JSON.net which when deserializing a file will crash if the file doesn't match the structure it's trying to serialize. This means that if I want to define an item that affects speed I have to define several variables in that object that it's not even going to use making the whole thing a big mess. My question is, is there a better file type to handle that data? or is there a better way to parse the JSON? https://ift.tt/eA8V8J

    So, i'm working on an Item system and I have a quick question in regards to Items. I typically use a set of Json files to hold my data which is fine except for Items which can different variables as they do different things. The issue is that i'm using JSON.net which when deserializing a file will crash if the file doesn't match the structure it's trying to serialize. This means that if I want to define an item that affects speed I have to define several variables in that object that it's not even going to use making the whole thing a big mess. My question is, is there a better file type to handle that data? or is there a better way to parse the JSON?

    from GameDev.net http://bit.ly/2MciS0h

    ليست هناك تعليقات

    Post Top Ad

    ad728

    Post Bottom Ad

    ad728