I’ve a problem with loading xml file. That’s what i do:
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Xml;
public class prova : MonoBehaviour {
public TextAsset gs;
private XmlDocument dom;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
dom.LoadXml (gs.text);
}
}
And that’s what unity tell me:
NullReferenceException: Object reference not set to an instance of an object
prova.Update () (at Assets/prova.cs:18)
I initialize variable gs in the Inspector