I'm new to programming and I have this script that I'm making, it makes a function that reads XML files based on your input, I've just ran into this issue though where I cannot access the variable named "XMLtext", it's public, can someone tell me what I'm doing wrong and explain it, I've tried various things.
using UnityEngine;
using System.Collections.Generic;
using System.Xml.Linq;
using System.Linq;
using System.Collections;
public class Data : MonoBehaviour {
public TextAsset XMLtext;
void Main () {
}
public static string XMLread (params string[] no) {
var XMLfile = XDocument.Parse ();
var a = Data.XMLfile.Element ("data");
for (int i = 0; no[i] == null; i++) {
}
}
}