开发者

Is it possible to define the asset name in a custom XNA content processor?

Normally, when loading content using XNA's Content Pipeline, the compiled .xnb files are accessed using an assigned "Asset Name" that can be defined in the Visual Studio GUI. By default, this name is the same as the content's filename sans extension. As a result, you cannot normally load two files that have names differing only by extension as the generated .xnb files would have conflicting names. If you manually change the asset name of one of these files, the generated .xnb files no longer conflict.

For a level loading system I am writing, I was hoping to have the setup of loading the texture data and collision data from two separate files with the same name (level1.png and level1.col) where the collision data is simply a text file. I have written a custom content processor to load the collision data using the Content Pipeline.

It seems it is not possible to modify the asset name directly in normal game code, but I have been unable to determine if it can be done from within a custom content processor. Is this possible? Or must I modify all the asset names by hand in order to 开发者_运维技巧do this?

I would ask this on the App Hub forums, but I am having a rather difficult time trying to log into that site without registering (and giving credit card information) for the developer package. I'm currently using XNA for a Windows platform game, and have no interest in developing for the X360 at this time.


In the interest of providing what I found, it seems that it is not possible to change the asset names from within a custom content processor either.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜