Is there a relatively simple way to dynamically reload content files, such as effect files?
I know I can do the following:
- Detect change of file
- Run content pipeline to rebuild that specific file
- Unload ALL content that was loaded
- Load all content
And use double references to reference content files.
The problem is with step 3 (and step 2 isn't that nice either). I need to unload everything because if I have model Hero.x
which references Model.fx
effect, and I change the Model.fx
file, I need to reload the Hero.x
file which will then call LoadExternalReference
on Model.fx
.
Has someone managed to make this work without rewriting the whole ContentManager
(and every ContentReader
) and tracking calls to LoadExternalReference
?