problem loading Particles system plist

Topics: Actions and Control Logic, Content Building and Deploying
Feb 24, 2014 at 10:53 AM
Edited Feb 24, 2014 at 10:55 AM

my particle system plist files are not loading,though I have use the same particle plist in a Cplusplus project and they work perfectly.

i am able to utilize animation plist file using the file stream method and using the CCSpriteFrameCache .my animation plist and particle system plist are in the same folder location.

i can't figure out what i am missing here. Any help would be appreciated.

Feb 25, 2014 at 5:49 AM
Tell us how you are creating the particle system plist file and how they are being included in the project.

You can create the particle system using the stream ctor or by using the content builder.
Feb 25, 2014 at 4:53 PM
Edited Feb 25, 2014 at 4:54 PM
i create the particle plist file using cocos2d windows particle editor.

they are included in project as part of a content project under the property section i have tried the following configurations

Build action= content
content importer= cocoplistImporter
content processor =cocosplistprocessor
copy to output directory = copy if newer


Build action= content
content importer= xml content
content processor =no processing required
copy to output directory = copy always

on the code part i have tried the following

explode = new CCParticleSystemQuad();
explode.InitWithFile(@"content\explode.plist"); and

PlistDocument p = new PlistDocument();
p.LoadFromXmlFile(@"content\explode.plist"); PlistDictionary pd = p.AsDictionary;

in both case i get the same result the application closes
Feb 27, 2014 at 6:00 AM
When the application closes you should get an exception, even if it is an illegal access violation. Illegal access will tell us that there is a problem with the embedded image particle. Other exceptions will tell us if your plist is being parsed successfully.
Feb 27, 2014 at 6:05 AM
Did you check the particle demo?

tests/classes/ParticleTest/ParticleTest.cs - find line 980 DemoParticleFromFile, which will load the plist for the emitter. This test class demonstrates just about everything you need to do the particle systems in cocos2d-xna.
Mar 2, 2014 at 4:55 PM

i have tried the particle test and they run on windows & android.

on wp7 after the reordering particles test it crashes and reports some system io exceptions and xna content exceptions

here is a list of what i have tried and there results

1 plist.AsDictionary result= not implemented exception

2 particlequad.initwithfile result=content load exception
  1. copied project to unrestricted folder result = no change on the above 2 cases
  2. Rcreated the project from scratch still have these issue
is there some limitation that make winp7 not able to handle plist and particles ?
Mar 3, 2014 at 11:51 PM
Windows and Windows Phone 7 should both work without any problems. Those were our original platforms.

If you could share the actual exceptions that are thrown that would help. It could be that you have a plist format that we are not supporting yet.
Mar 8, 2014 at 12:55 PM
hello ,

thank you for ur patience so far. After ur last response i reinstalled everything on my computer just in case something was corrupt.

this is the output from the debug windows(nothing else pops up)

A first chance exception of type 'System.IO.FileNotFoundException' occurred in
A first chance exception of type 'Microsoft.Xna.Framework.Content.ContentLoadException' occurred in
The program '[3532] TaskHost.exe' has exited with code 0 (0x0).

The files are copied to the content folder so i do not understand why i am getting a file not found exception

thank you
Mar 8, 2014 at 5:08 PM
if you are loading the plist as content using the content manager then it is looking for a FILENAME.plist.xnb in the output directory. If that doesn't exist then you will get a file not found error.


Build action= content
content importer= cocoplistImporter
content processor =cocosplistprocessor
copy to output directory = copy if newer

This will produce the XNB file that the content manager is looking for. After you build the project, check the bin directory to see if you have the plist.xnb file in the content folder.
Mar 26, 2014 at 10:56 PM
the file is correctly generated in the content folder as FILENAME.plist.xnb but still the application closes with content load exception.

how can i tell if the textureImageData key from the plist file is being loaded properly ?