Dynamic content realoding

Posted by Kikaimaru on Game Development See other posts from Game Development or by Kikaimaru
Published on 2012-04-11T11:17:46Z Indexed on 2012/04/11 11:43 UTC
Read the original article Hit count: 249

Filed under:
|

Is there a relatively simple way to dynamicaly reload content files? (ie: effect files)

I know i can do following:

  1. Detect change of file
  2. Run content pipeline to rebuild that specific file
  3. Unload ALL content that was loaded
  4. Load All content

And use double references to reference content files.

Problem is with step 3 (and step 2 isn't that nice too). But i need to unload everything because if i have model Hero.x which references Model.fx effect, and i change Model.fx file, i need to reload Hero.x file which will then call LoadExternalReference on Model.fx.

So I guess question is, did someone mange to make this work without rewriting whole ContentManager (and every ContentReader) and tracking calls to LoadExternalReference?

© Game Development or respective owner

Related posts about XNA

Related posts about xna-content-pipeline