Author Topic: Atlas/Font maker to check the read-only flags on files  (Read 3373 times)

step

  • Guest
Atlas/Font maker to check the read-only flags on files
« on: July 16, 2012, 09:22:45 PM »
Hey again,

I'm using the version control system that sets the read-only flags for files that were not checked out. So the annoying thing is when i forget to check out atlas files, they are marked read-only, unity does not overwrite some files, and the UI elements in the current scene get screwed. Only way to get them back to normal is to quit unity without saving.

Can you please add the code that checks read-only flag on files that belong to atlas before actually updating it?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas/Font maker to check the read-only flags on files
« Reply #1 on: July 17, 2012, 10:17:00 AM »
Saving of the texture happens in UIAtlasMaker line 437 and 456 -- you'll need to make your changes there. I simply do WriteAllBytes. If you make the changes and post them here, I'll add them to the repository.

step

  • Guest
Re: Atlas/Font maker to check the read-only flags on files
« Reply #2 on: July 17, 2012, 03:32:51 PM »
Here. I added the code that clears the read-only flag of atlas texture file - unity does this with .prefab and .meta files anyways.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Atlas/Font maker to check the read-only flags on files
« Reply #3 on: July 17, 2012, 05:51:32 PM »
Thank you, I've added it to my repository so you will see it in the next update. :)