Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: step on July 16, 2012, 09:22:45 PM

Title: Atlas/Font maker to check the read-only flags on files
Post by: step 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?
Title: Re: Atlas/Font maker to check the read-only flags on files
Post by: ArenMook 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.
Title: Re: Atlas/Font maker to check the read-only flags on files
Post by: step 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.
Title: Re: Atlas/Font maker to check the read-only flags on files
Post by: ArenMook 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. :)