I am currently trying to develop a small fighting game in Unity (Be aware that I have close to no C# experience as I am a Javascript developer). Said game contains Objects of the Class Move which contains an Array of MoveFrame.
I need to store the data to create the MoveFrames of a Move in an easily human-readable and editable format so that other people are able to edit these values on the fly.
MoveFrame looks like this:
public class MoveFrame
{
private Rect[] hurtboxes { get; }
private hitbox[] hitboxes { get; }
private Rect collision { get; }
private int velocity { get; }
private bool counter { get; }
public MoveFrame(Rect[] hurt, hitbox[] hit, Rect coll, int velo, bool ch)
{
hurtboxes = hurt;
hitboxes = hit;
collision = coll;
velocity = velo;
counter = ch;
}
public struct hitbox
{
int hId;
int dmg;
bool scale;
Rect[] ground;
Rect[] air;
}
}
I was considering JSON as it would likely fit my needs for said problem quite well, but I am unsure if there is any way to parse it in C#.
Are there any fitting dataformats which you can easily parse in C# that would be appropriate for said problem?
You can achieve that using ScriptableObjects. They are unity assets that stay stored inside your game, and let you access and modify their data throw the inspector windows in a very readable and human-friendly way