I want to be able to do something like this:
public FileInfo XmlBehaviourFile;
And then use the asset browser in the Unity editor to select an asset. (Ideally, I would like to limit it to XML files but that isn't too important).
I am aware of
TextAsset but I can only access either a string or byte array of the contents. I can probably make this work, but at the moment, my library takes a
FileInfo and handles the reading itself.
Is there a Type I can use that will make Unity let me choose a file in the editor and then simply store the path (ideally, it would handle making sure the path is relative and including the asset in the build).
Alternatively, would it be possible to write such a type that would work, I've not extended Unity, but I am aware it is possible.