Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

STUUI - Skinning and Templating (and localization) for Unity UI (fka uGUI)

Discussion in 'Assets and Asset Store' started by jashan, Feb 1, 2015.

  1. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Now available on the Unity Asset Store (my second package after ScoreFlash):

    STUUI
    Skinning and Templating for Unity UI

    (also supports localization)​


    STUUI is a simple, yet powerful way to add skins / templates to your Unity UI GUIs. It's so flexible that you can even use it for localization! The original idea was to have a central place to store certain color values that could then easily be changed without having to run through each every single Graphic-component in your GUI in every scene of your game. But to make it a complete solution, more features were added.

    STUUI uses "the Unity way" for templating: You reference Prefabs from your actual GUI and by changing the prefabs, your GUI immediately changes. However, the approach is very versatile: You could also define one reference button in your scene, for example, and then link that button from all other buttons in that same scene to have changes in that one button applied to all the other buttons immediately.

    Here's a link to the full API documentation: STUUI API Documentation

    And a link to a little PDF introducing you to the basics: STUUI Basics


    Early Adopters Sale
    70% off - $15 instead of $50!

    >>> Buy now!!! :) <<<

    The initial release (V1.0.0) is already kind of feature complete and should give you really nice skinning/templating functionalities for Unity UI - but over time, I'll be adding more features. While adding those features, I'll also incrementally increase the price. So - if you're quick, you can get STUUI at a super-cheap price but still you'll get all the features once they're ready. Currently, I put it on the store for only $15 (plus VAT) - eventually, the price will go up to $50!

    Current Roadmap:
    • Adding more videos and documentation (= very soon)
    • Support for more components, e.g. Selectable; may be limited to some specific Transitions (Color Tint and Sprite Swap for sure, Animation maybe). InputField: Selection Color, Caret Blink Rate, Hide Mobile Input. More: Ask for what you need and I'll consider adding those! Planned for STUUI 1.1, 1.2 maybe 1.3 (= soon) ;-)
    • Component / child GameObject creation / destruction: Imagine a button that needs multiple images in one style (one background image with one color, and another one above it with another color, and maybe some icon with yet another color), and only one image in another style (just the usual Button); to be able to switch between those two styles, STUUI needs to dynamically add or remove some child objects and components ... this is a little tricky to implement but will be even more powerful when it's done. Planned for STUUI 2.0 (most likely mid 2015, maybe earlier)
    • TemplateCollections will eventually also support XML export and loading the definitions via XML. Main challenge here is for "binary data" like Sprites and AudioClips ... the way this will probably be done is by using lookup-gameobjects or Resources so the XML-file will contain only the name and use Unity's built-in loading mechanisms to then load and assign the actual file. Planned for STUUI 3.0 (probably late 2015, maybe earlier)

    ... and this, of course, will be the support and update thread ;-)
     
    Last edited: Feb 10, 2015
  2. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    It's online at last!

    I'm looking forward to your feedback / feature requests!
     
  3. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,294
    Do you provide the asset also with samples where the graphic parts are changing?
    Would like to see that this will be supported too from your asset.

    Edit:
    Oh and i have a new feature request.
    With it i can use this to easy reuse a standard unity ui menu scene for every new game and that could save time :)
    Can you add some kind of function that i can use to decide per project wich part of the menu or menu tree part i will use?

    I mean for example i could have a standard menu that i will use for all my games that i can not also change it´s look but also it´s functions/features.
    So for one game i need the complete features of the ui but for the next i do not need all the multiplayer parts of the ui in the menu so i can easyly switch them of hopefully with your asset and when it was build, that parts will not be in the app or exe.
    I only mean the ui parts so no deeper injection in full games.

    Another example could be that i make a game for windows and also ios.
    For the windows game i want that the user can change his resolutions in the menu ui but for the same game on ios i do not want that feature.
    When i wrote this i just thought that this is another feature on top of my request, maybe and that is a per platform decision system for the ui for what i want to use in each project.

    Edit2:
    Just want to say that i realy like your asset :)
     
    Last edited: Feb 13, 2015
    jashan likes this.
  4. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    I already have one case like this in the localization example. There, I replace a flag with another one. In the next release, however, I'm planning to also add different graphics, in other words completely different styles. So that will include a few different GUI skins and examples where those are changed.

    That's a great idea - but it's not really the scope of STUUI (well, part of it is - see also below). For reusing the same menu in different games, I'd recommend using Unity's package system (Export Package / Import Package), combined with a simple menu manager where you can easily switch certain areas on/off. Actually, you might even be fine simple activating / deactivating those areas of the menu. When you use one of the Layout Managers (VerticalLayoutGroup, HorizontalLayoutGroup or GridLayoutGroup) built in to Unity UI, this should work quite nicely with just standard stuff that comes with Unity / Unity UI.

    Well, for changing the style, STUUI will be super-helpful. So, what this gives you is that you can easily reuse that standard package that you create for yourself (and that you use in every game). That would include the switching on / off - and by using SkinTemplates and TemplateCollections, you can then easily switch out the look of the menu depending on the game.

    A small part of that even is included in the NGUtil class which is part of the package (that one's also part of ScoreFlash). Another part is the CollectionSelector - but I'd probably add something like PerPlatformCollectionSelector in addition to that to automate switching TemplateCollections depending on the platform. That would fit very well with the scope and design of STUUI - so that's something I'll definitely add!

    Thanks for sharing your feature requests!

    Thanks you! It would be lovely if you could also write a little review - especially in the beginning, when there's no reviews, yet, it's always a little difficult.
     
  5. RobinBGbanga

    RobinBGbanga

    Joined:
    Oct 20, 2014
    Posts:
    16
    Hi! Just bought the plugin. Looks great from the videos. Sadly, I couldn't get the UI update to work so far:
    Behaviour in the Video on Asset Store:
    • "Immediate Updates" checked: UI elements with a SkinTemplate component update immediately every frame
    • "Immediate Updates" unchecked: UI elements update whenever you hit Apply on the referenced prefab
    Behaviour in our project (Unity 5.3.5f1):
    • "Immediate Updates" checked: UI elements with a SkinTemplate component update whenever you hit Apply on the prefab
    • "Immediate Updates" unchecked: UI elements update only when you close and re-open the scene or when you enter Play Mode once
    For now, an acceptable workflow is to keep Immediate Updates enabled on all components, but I'm concerned in terms of performance. Would be glad to know if you can reproduce this or if there are workarounds to fix that. Thanks!
     
  6. RobinBGbanga

    RobinBGbanga

    Joined:
    Oct 20, 2014
    Posts:
    16
    Re: Previous post
    I did a bit of research. Unity UI update behaviour seems to act differently in newer versions of Unity. I've only tested 5.0.3f2 against 5.3.5f1 so far, so I don't know when it broke exactly, but basically:
    • U 5.0.3f2: The "Preview" function in the editor provides real-time updates to the viewport
    • U 5.3.5f1: The "Preview" function just rescales the bounds gizmo of the object, but not the object itself
    To illustrate I've created a gif of the two behaviours. I think this might be related to the issue I'm having with your plugin, too.

    http://imgur.com/zfIxCHT

    I've filed an issue report to Unity, found here:
    https://issuetracker.unity3d.com/issues/recttransform-preview-does-not-update-image-appearance

    Not sure if that's related to the STUUI issue, but looks like it could be.
     
    Last edited: May 31, 2016
  7. RobinBGbanga

    RobinBGbanga

    Joined:
    Oct 20, 2014
    Posts:
    16
    A question popped up which I didn't really find answered in the documentation: What's the behaviour in regards to RectTransform components? I found that they tend not to update (e.g. if I have a child with a certain width, and I change the width, this is not reflected in the other SkinTemplated objects that reference the source), but under some circumstances the change was suddenly updated.

    Updating RectTransform sizes is a fundamental thing I'd require from the plugin. A few use cases:
    • control width of a scrollbar for all ScrollViews in the app
    • control inset of a button text label for all buttons
    Is that fully supported? Maybe my workflow is wrong? Thanks!
     
  8. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Hey there, sorry for the late reply. Usually, I should be getting email-notifications but I might have missed that while traveling. Fortunately, I just saw it in the forum notifications ;-)

    Thanks for reporting the issue and doing the research. I'm in the middle of pushing a release of my game Holodance at the moment but should be able to check STUUI in Unity 5.3.5 tomorrow. Even if it's a Unity issue, I might be able to work around it. Unless you need update each frame, you should not need to activate immediate updates but you can safely use this as a workaround until I provide a real fix.

    Regarding the RectTransform, I have to admit: I'm not sure ... but that's something I'll find out once I review the project for Unity 5.3.x. In case RectTransform sizes are currently not supported (I actually believe they are), it shouldn't be too hard to implement it.

    STUUI unfortunately never really sold many units (I believe 10 so far ;-) ) but it may actually be quite useful for Holodance (thought of integrating it a few times but didn't find time for it so far).