I have an problem: I am trying:
private struct QueuedFile
{
public Type t;
public object LoadedFile;
public string path;
public bool loaded;
public ContentManager c;
public QueuedFile(string path, Type t, ContentManager c)
{
this.t = t;
this.path = path;
LoadedFile = null;
loaded = false;
this.c = c;
}
public void Load()
{
LoadedFile = c.Load<this.t>(path); //<--ERROR: <this.t>
loaded = true;
}
}
But this gives me an error. Has anyone an idea how to save the variable T for an method like:
public T LoadFileByType<T>(string path);