Hello Guest

Author Topic: Recommended Changes to TK2D Folder Structure  (Read 4338 times)

srivello

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Recommended Changes to TK2D Folder Structure
« on: June 12, 2013, 03:45:59 am »
To facilitate logical organization I recommend changing the folder structure (including those related to maps and ui) of TK2D to;

  • Assets/tk2d/source/code
  • Assets/tk2d/source/editors
  • Assets/tk2d/source/goodies
  • Assets/tk2d/source/shaders
  • Assets/tk2d/examples/(1 scene per demo*)
  • Assets/tk2d/examples/(1 folder per demo*)

*Matching the scene name to the folder name
« Last Edit: June 12, 2013, 04:03:25 am by srivello »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Recommended Changes to TK2D Folder Structure
« Reply #1 on: June 12, 2013, 10:24:19 am »
The tilemap and ui are kept separate, quite intentionally, so you can delete them if you don't use them in your project. It would be considerably harder to delete them if the code was all over the place. Eg. previously the tilemap system was inside tk2d/Code/... and tk2d/Editor/... making it quite a bit harder to remove completely from the project.

The real problem is with Unity though - you're basically stuck with the first folder layout you pick. Upgrades will not move files around into new folders, and this can cause serious issues when upgrading.

srivello

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Recommended Changes to TK2D Folder Structure
« Reply #2 on: June 12, 2013, 05:08:51 pm »
...1. so you can delete them...

I wouldn't imagine people would cherry pick that functionality, but ok. I've updated my suggestion.

  • Assets/tk2d/source/code
  • Assets/tk2d/source/editors
  • Assets/tk2d/source/goodies
  • Assets/tk2d/source/shaders
  • Assets/tk2d/source/tilemap
  • Assets/tk2d/source/ui
  • Assets/tk2d/examples/(1 scene per demo*)
  • Assets/tk2d/examples/(1 folder per demo*)

...2. The real problem is with Unity though - you're basically stuck with the first folder layout you pick...

Is that specific to asset store items? Either way is this a reported bug fix I can vote on?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Recommended Changes to TK2D Folder Structure
« Reply #3 on: June 12, 2013, 05:22:56 pm »
Quote
...2. The real problem is with Unity though - you're basically stuck with the first folder layout you pick...

Is that specific to asset store items? Either way is this a reported bug fix I can vote on?

No, its not specific to asset store items - it is just how Unity packages work. Its not a bug, it is like that by design. Obviously that design limits how I can move files around, but it also means that if you've moved a file (from within the Unity interface), importing a new package will correctly update that moved file.


Also about your suggestion, I think you've missed that there are samples specific to the UI, and soon samples specific to the tilmap system, and editor classes specific to each of these. By the time you've added all those, you'd be no better off than you are now :)

FWIW - in the past we had all the samples in a separate unitypackage in the project, but the asset store guys didn't like that and we were asked to include everything in the project.