public class XMLStringReader : MonoBehaviour {
public string slectedItem;
private bool editing = false; public string signalsa;
public XmlReaderSettings settings; void OnGUI() {
if (GUILayout.Button(slectedItem)) {
editing = true;
} XmlReaderSettings settings = new XmlReaderSettings();
settings.IgnoreWhitespace = true;
settings.IgnoreComments = true; using (XmlReader reader = XmlReader.Create("D://Docs/Unity3D/cdp/UDPApplication/Components/UDPIOServer.xml", settings)) {
while (reader.Read()) {
if (reader.NodeType == XmlNodeType.Element) {
if (reader.HasAttributes) {
if (reader.GetAttribute("UnityName") != null) {
signalsa = reader.GetAttribute("UnityName");
string[] signalsCDP = { signalsa };
//ahjesus
if (editing) {
for (int i = ; i < signalsCDP.Length; i++) {
if (GUILayout.Button(signalsCDP[i])) {
slectedItem = signalsCDP[i];
editing = false;
print(signalsCDP[i].ToString());
}
}
}
}
}
}
}
}
}
}