Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
  4. Join us on Thursday, September 29, for a day with Unity's SRP teams here on the forum or on Reddit, and discuss topics around URP, HDRP, and the Scriptable Render Pipeline in general.
    Dismiss Notice

Official The UI Toolkit Sample Project - Dragon Crashers is now available on the Asset Store

Discussion in 'UI Toolkit' started by eduardooriz, Sep 5, 2022.

  1. eduardooriz

    eduardooriz

    Unity Technologies

    Joined:
    May 28, 2018
    Posts:
    35


    The UI Toolkit Sample Project - Dragon Crashers is now available on the Asset Store.

    >> Download it from the Asset Store <<

    The UI Toolkit sample demonstrates how you can leverage UI Toolkit for your own applications. This demo involves a full-featured interface over a slice of the 2D project Dragon Crashers, a mini-RPG, using the Unity 2021 LTS UI Toolkit workflow at runtime.

    This project was developed as a companion piece to the upcoming e-book User interface design and implementation in Unity. The e-book will explain how to use UI features in Unity, mainly the UI Toolkit, to create user interfaces. Available this fall. Preregister here to have the guide emailed to you once it’s live.



    Some of the actions illustrated in the sample project show you how to:
    • Style with selectors in Unity style sheet (USS) files and use UXML templates
    • Create custom controls, such as a circular meter or tabbed views
    • Customize the appearance of elements like sliders and toggle buttons
    • Use Render Texture for UI overlay effects, USS animations, seasonal themes, and more
    To try out the project after adding it to your assets, enter Play mode. Please note that UI Toolkit interfaces don’t appear in the Scene view. Instead, you can view them in the Game view or UI Builder.

    The menu on the left helps you navigate the modal main menu screens. This vertical column of buttons provides access to the five modal screens that comprise the main menu (they stay active while switching between screens).

    While some interactivity is possible, such as healing the characters by dragging available potions in the scene, gameplay has been kept to a minimum to ensure continued focus on the UI examples.

    Please try it out and share your thoughts! Do let us know what works as expected, as well as what's missing, confusing or broken. As always if you run into any issues tell us all about it below!

    Tech info:
    We recommend that you open a new empty project to view this sample project because it imports assets into the root/Assets folder.
    • Made for Unity 2021 LTS
    • Uses the 2D Renderer in the URP
    • Uses the following 2D packages: 2D Animation and 2D PSD Importer
    PS: If you’re interested in the 2D graphics and gameplay in the UI Toolkit sample, check out the e-book 2D game art, animation, and lighting for artists.
     

    Attached Files:

  2. MrCrispy

    MrCrispy

    Joined:
    Dec 2, 2015
    Posts:
    2
    While I'm incredibly excited to take a look at this, I have yet to be able to get it to import/work properly. Even when I specifically install the 2021.3.7 version of the editor, I get the following errors when I try to import:

    upload_2022-9-12_14-4-22.png

    Granted, it could just be user error on my part. I'm using an 2D, URP project before I import the package.
     
  3. wilmer_lin

    wilmer_lin

    Joined:
    Nov 7, 2014
    Posts:
    4
    @MrCrispy To fix those errors, update the 2D SpriteShape package in the Package Manager.

    If you have exclamation points/warning icons that show up over the sprites after doing this, you may need to also select the Assets folder in the Hierarchy and right-click > Reimport All.

    Also, you can avoid the above steps, if you use the 3D(URP) template when creating the project.
     
    Last edited: Sep 12, 2022
    Heikkih and eduardooriz like this.
  4. VP_no1

    VP_no1

    Joined:
    May 12, 2018
    Posts:
    132
    I used 2d URP too. No need reimport anything. Read closely bellow:
    I found the solution and I posted on GIT too: you need to UNLOCK this and then the upgrade button will appear instead (after that update errors are gone !)
     

    Attached Files:

  5. eduardooriz

    eduardooriz

    Unity Technologies

    Joined:
    May 28, 2018
    Posts:
    35
    Thanks for letting us know about this issue, and thanks for the fixes. We fixed this in 1.02 (live soon on the Asset Store), basically, the package 2D Sprite Shape wasn't being updated to the latest version alongside the other packages, we changed the package manifest to correct this. In the meantime, just install the latest 2D Sprite Shape package, or remove it (we don't use it in this demo), either way will work
     
  6. MrCrispy

    MrCrispy

    Joined:
    Dec 2, 2015
    Posts:
    2
    Updating that particular package worked like a charm. Thanks everyone!
     
    eduardooriz likes this.
  7. dorusoftware

    dorusoftware

    Joined:
    Jul 5, 2012
    Posts:
    773
    I can confirm that works fine on 2021.3.9f1, no errors

    but really? A BOOK? who have time to read a book? Can't you just spend two hours and create a VIDEO tutorial walking users trough this ultra complicated setup with attached scripts that references other scripts? Is a mess.

    No one reads books, create some online reference help area if possible, and then open a screen capture app and record one or two hours of someone speaking walking trough this project.

    Can't unity just implement one of those node based windows that show how stuff is linked together? Like how unreal has? At leas we can figure out which stuff loads what and where.

    Did you have fired all people that know how to make tutorials or can speak clearly? You have only music in your youtube videos, did you have fired the person that was talking on the tutorials?

    Don't you know that youtube has AI voice recognition over videos to figure out what the video is about and show it in the search engines? If you use only music you get penalized.

    You've merged with an add company, those advertising professionals should know this stuff. Make a video, speak clearly and reuse trough out the video the words that you want to be included by youtube as key words for search results.

    and that landing page for the book, looks like those scam websites that give free stuff just to get your data and then send you spam emails or super expensive products.
     
    MousePods likes this.
  8. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    2,304
    C'mon mate, really? "No one reads books"? If you're going to say such sweeping generalisations you ought to have some proof to go with that.

    Most sane people use books as reference materials. It's much more convenient to flip to the right page of a book (digital or otherwise) to reference what you need, than it is to scrub through to some arbitrary point in a video.
     
    Last edited: Sep 16, 2022
  9. dorusoftware

    dorusoftware

    Joined:
    Jul 5, 2012
    Posts:
    773
    If you have time to read a book just to create three buttons in an interface, be my guest.
     
  10. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    2,304
    I mean I learned UI Toolkit by reading the documentation, so... it's not that different.
     
  11. dorusoftware

    dorusoftware

    Joined:
    Jul 5, 2012
    Posts:
    773
    this is not a book about learning the UI, is a book on how to create and understand this UI project specifically. you are blind of the hate you have against me. You need to stop and think what I'm trying to explain instead of jumping to conclusions.

    I'm ok with having a book or online text resources easy to access that explain each UI module and feature clearly. Is what you are saying with your posts. I'm the same idea as you.

    What we have here is that they have released this project and they are telling you to compile a scam looking page so you can get the book explaining this project by mail.

    Why do I need to give them all my personal data? Doesn't unity already have this data? What is the point of this?

    To understand this project better and faster a video walktrough on how was build and what is inside is way better than reading some not yet released book. The if we want to check what a particular UI element does the online resource you are talking about is the way to go.
     
  12. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    2,304
    What are you on about? It's literally a learning guide for UI toolkit that uses this project as an example piece. I could quote what it says above... but it's literally at the top of this page, lol.

    It's a reference document that has a hands on, tangible (as tangible as you can get digitally) example to go with it.

    If that's not a good learning resource, I don't know what to say mate. You can go back to your Youtube videos I suppose.

    As for the personal details, I imagine this it to gauge levels of engagement and cross reference that with their existing user base. You know, see who among their user base is engaging with these documents, and if its worth producing more in the future.

    You can always throw nonsense in them with a throw away email account if you are so pointlessly paranoid.

    Any way my original post was to pick fun at you saying 'nobody reads books'. You can't say such sweeping generalisations. Tons of people read books; more than ever, would you believe. And Unity have been producing these PDF guides for a while. If no one was using them, they wouldn't keep making them.
     
  13. dorusoftware

    dorusoftware

    Joined:
    Jul 5, 2012
    Posts:
    773
    never knew these exist can you link a couple, i want to check see what is about
     
  14. eduardooriz

    eduardooriz

    Unity Technologies

    Joined:
    May 28, 2018
    Posts:
    35
    Hey Dorusoftware

    The email provided is only so you get the link of the ebook in your email when it's available, nothing else. The rest of the info is there only because we use the same form we use for other marketing campaigns.

    Regarding the e-book, it provides a very deep dive into all the systems that come into play for UI, from Unity UI to UI Toolkit (runtime), it's aimed at professional UI Artists and any dev working with UI. We teamed up with UI Artists, front end designers, the UI teams at Unity and even game designers for the content of the book, I think it will be worth a look, and for sure, not all chapters are for everyone, so it's more of a reference book, than a must-read from top to bottom, we also provide some content, tips, write ups that are more appropriate for a book format than documentation, of course, acknowledging that the documentation is and will be the ultimate source of truth.

    Here you can find examples of other of our ebooks:
    1. Optimize your game performance for mobile
    2. Console/PC game perf. optimization guide
    3. Unity Gamedev Field Guide
    4. Optimize Your Mobile Game Performance
    5. Version control and project organization best practices for game developers
    6. Unity for Technical Artists: key toolsets and workflows (2020 LTS edition, 21 LTS ed. coming out soon)
    7. 70+ tips to increase productivity with Unity LTS 2020 (2020 LTS edition, 21 LTS ed. coming out soon)
    8. HDRP Definitive Guide to Lighting (2020 LTS edition)
    9. Game Designer Playbook
    10. 2D Game Art , Lighting and Animation
    11. Ultimate Guide to Profiling
    12. HDRP Definitive Guide to Lighting (2021 LTS edition)
    13. Introduction to the Universal Render Pipeline for advanced Unity creators
    14. Create a C# style guide: Write cleaner code that scales
      ... many more coming soon like a massive VFX Artist ebook
     
  15. dorusoftware

    dorusoftware

    Joined:
    Jul 5, 2012
    Posts:
    773
    Thank You for the links, they look like great information to have. Too bad I didn't know they exists when trying to learn out unity. :( Both unity and unreal have great official tutorials but both companies don't present them in a good way, is never clear where they are located. I recall that to discover both game engines "learning" areas was just a causality of browsing the forums and finding someone posting a link

    I don't want the book in the mail immediately when it shows up, maybe there is a place where can I visit and when its available I can get it?

    Edit: I'm looking at some of the books, now I'm really annoyed, why this information was not promoted better. The book about optimizing the game for mobile have so much helpful stuff
     
  16. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    2,304
    It's a PDF... Just download and store it somewhere on your computer.
     
    thomas_jacobsen_unity likes this.
  17. eduardooriz

    eduardooriz

    Unity Technologies

    Joined:
    May 28, 2018
    Posts:
    35
    It will be a link to the page where you can read it or download it if I remember correctly
     
  18. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    656
    I checked this demo, it's nice to see working stuff like this, but I am kind of disappointed about animating - is really render texture the only way to create animation? I don't mean moving element left and right, but something more fancy.
    Is there any support for flipbooks or anything like that? Or even better - custom shader/material?
     
  19. eduardooriz

    eduardooriz

    Unity Technologies

    Joined:
    May 28, 2018
    Posts:
    35
    Flipbook animation can be achieved via c# swapping the sprites, but the team is working on an integrated solution, based on the roadmap info: https://unity.com/roadmap/unity-platform/gameplay-ui-design
     
    Qriva likes this.
unityunity