spritebuilder / SpriteBuilder

Objective-C Game Development Suite
http://www.spritebuilder.com/
Other
740 stars 292 forks source link

Source files can be imported incorrectly which breaks spritesheets #1511

Open rkachowski opened 9 years ago

rkachowski commented 9 years ago

If you add a folder within the navigator view and then directly copy your source files in via Finder, the application won't create the appropriate resource/resolution folder structure and SpriteBuilder will crash in various places.

to reproduce

  1. Create a new project
  2. Add a new folder in the file view(call it sprites)
  3. Right click the new folder and open in finder
  4. Add source files here
  5. Convert your new folder to a smart sprite sheet
  6. hit publish

    result

The application crashes inside Tupac.mm as it cannot create a CGBitmapContext from null source files.

expected

The application is aware of the situation inside the sbpack directory, and it isn't possible to put it into a state that crashes everything. Either the integrity of the package is maintained or an appropriate folder structure is generated when the sprites are first added to the project.