Here is a question I hope someone could really answer. When ever I add the system.xml.linq to my references shut down my game and restart it disappears, why is that?
As far as I know System.Xml.Linq is included automatically, because those solutions use Microsoft compiler under the hood. So you don’t need to explicilty add reference to System.Xml.Linq
As for Assembly-CSharp, yes, you’re right, it does disappear, because Unity is regenerating the project from scratch, and any modifications done to that project will be lost, System.Xml.Linq will be added by default to Assembly-CSharp in 4.3
Thanks for the information. You have solved alot of problems. I still have to add it because the compiler doesn’t see it otherwise unless I am doing something wrong.
Just went and fixed everything and kept it all the same going to post the answer though using XDocument and XElement.
I am using Scoreoid’s api which is a beast and here is the snippet to make everything work.
void OnGUI()
{
//convert our xelements to usable xml parsed data
IEnumerable<XElement> players = data.Elements();
IEnumerable<XElement> score = data.Elements();
GUILayout.BeginArea(new Rect(150, 70, 1000, 800));
foreach (var player in players.Elements())
{
GUILayout.TextArea(players.Elements("player").Attributes("username").ElementAt(0).Value, style, GUILayout.Width(600));
}
GUILayout.EndArea();
GUILayout.BeginArea(new Rect(650, 70, 1000, 800));
foreach (var scores in score.Elements())
{
GUILayout.TextArea(scores.Elements("score").Attributes("score").ElementAt(0).Value.ToString(), style, GUILayout.Width(600));
}
That should be all you would need in ONGUI to get it to look nice and pretty.