2
\$\begingroup\$

My project has multiple skins and sometimes we have to deal with skins with many custom styles. Editing them in the editor is difficult, for instance, I cannot delete one style that is not the last one without deleting the ones after it.

Would there be a way to edit a file that represents this skin?

Could I edit a skin file if I use Text in the Asset Serialization Mode (Unity Pro)?

If not, is there something in the Unity Store to help me better edit skins?

\$\endgroup\$
2
\$\begingroup\$

Yes, using the text serialization (a flavor of YAML) will allow you to hand edit the gui.skin file (but you'll need to be incredibly careful). I think text asset serialization is available in the free version of Unity now.

You can also write an Editor script that iterates of the fields of the GUISkin.

Here's a script I wrote to merge multiple GUISkins into a single GUISkin with multiple custom styles: https://gist.github.com/2242083

\$\endgroup\$
0
\$\begingroup\$

You can simply delete styles by selecting them (click the foldable header line) and press the DEL-button ;) This is valid for all arrays viewed in the inspector. If the array hold references to other assets pressing delete will just "null" the element. In this case you have to use Shift+DEL.

You can also duplicate an element be pressing CTRL+D. This will duplicate the current element and insert it right below the original. You almost never need to adjust the size value manually since you can easily add and remove elements. The only thing that is missing is reordering the elements.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.