コード例 #1
0
    DialogSet LoadDialogSet(string fileName)
    {
        TextAsset file = Resources.Load <TextAsset>("Dialogs/" + fileName);

        if (file != null)
        {
            try{
                DialogSet dialog = DialogSet.CreateFromJSON(file.text);
                return(dialog);
            }
            catch (Exception e) {
                Log.log("Error Loading JSON");
                Log.log(e.Message);
            }
        }
        else
        {
            Log.log("Dialog JSON file does not exist.");
        }
        return(null);
    }