I am trying to get an int array from the method GetValue(this, null), but I only get System.Int32[]. Any ideas? I'm expecting to get as output the value of consequences2 (when the function will be called with textNum = 2), which is [3,4,5], but I only get "System.Int32[]". I need to get the value on runtime because the app I'm developing is a testual game with potentially over 500 of these arrays.
using System.IO;
using UnityEngine;
using System;
using System.Reflection;
using System.Linq;
public class DialogueManager : MonoBehaviour
{
    //999 IS RETURN TO MENU
    //1000 IS CLOSE GAME
    public static DialogueManager instance = null;
    Dialogues dial;
    public string text1 { get; set; }
    public string choices1 { get; set; }
    public int[] consequences1 { get; set; }
    public string text2 { get; set; }
    public string choices2 { get; set; }
    public int[] consequences2 { get; set; }
    public string text3 { get; set; }
    public string choices3 { get; set; }
    public int[] consequences3 { get; set; }
    public string text4 { get; set; }
    public string choices4 { get; set; }
    public int[] consequences4 { get; set; }
    public string text5 { get; set; }
    public string choices5 { get; set; }
    public int[] consequences5 { get; set; }
    string fixedName;
    string[] choices;
    string text;
    string[] consequences;
    private void Awake()
    {
        if(instance == null)
        {
            instance = this;
        }
        dial = new Dialogues();
        StreamReader sR = new StreamReader(Application.dataPath + "/GameData/dialogues.json");
        string json = sR.ReadToEnd();
        dial = JsonUtility.FromJson<Dialogues>(json);
        text1 = dial.text1;
        choices1 = dial.choices1;
        consequences1 = dial.consequences1;
        text2 = dial.text2;
        choices2 = dial.choices2;
        consequences2 = dial.consequences2;
        text3 = dial.text3;
        choices3 = dial.choices3;
        consequences3 = dial.consequences3;
        text4 = dial.text4;
        choices4 = dial.choices4;
        consequences4 = dial.consequences4;
        text5 = dial.text5;
        choices5 = dial.choices5;
        consequences5 = dial.consequences5;
    }
    public string GetText(int currentText)
    {
        fixedName = "text" + currentText;
        string output = typeof(DialogueManager).GetProperty(fixedName).GetValue(this, null).ToString();
        Debug.Log(output);
        return output;
    }
    public string GetTextChoices(int textNum)
    {
        fixedName = "choices" + textNum;
        string output = typeof(DialogueManager).GetProperty(fixedName).GetValue(this, null).ToString();
        if (output == "System.String[]")
        {
            output = null;
        }
        return output;
    }
    public int[] GetChoicesConsequences(int textNum)
    {
        fixedName = "consequences" + textNum;
        int[] values = (int[])((dynamic)this).fixedName;
        return values;
    }
}
public class Dialogues
{
    public string text1;
    public string choices1;
    public int[] consequences1;
    public string text2;
    public string choices2;
    public int[] consequences2;
    public string text3;
    public string choices3;
    public int[] consequences3;
    public string text4;
    public string choices4;
    public int[] consequences4;
    public string text5;
    public string choices5;
    public int[] consequences5;
}
 
    