Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

What's the best way to setup a trivia/quiz type app using 4.6?

Discussion in 'UGUI & TextMesh Pro' started by animepauly, Aug 27, 2014.

  1. animepauly

    animepauly

    Joined:
    Nov 9, 2013
    Posts:
    3
    Hi all! I am loving Unity 4.6 right now but am uncertain the best way to architect a full mobile app with this. Most of the app is created entirely with UI components as I don't need any 3D capabilities. Right now I have one context that holds all of my panels and I use mecanim to transition between them. Every panel is basically a screen view. When the panel is animated on screen I make it active and when a panel is offscreen I make it inactive and call my custom destroy method on the panel to remove any objects in memory that aren't needed. I thought at first I should make a scene for each view but it seems I don't have good control over transitions that way.

    I have no idea if this is the best way nor do I know the best way to update my ui from external data that I will introduce. I was creating this in Famo.us/Angular at first but some of the limitations of that framework forced me to see if Unity was a better option. Plus I just like developing in Unity more and I know the fidelity will be better. Any thoughts and suggestions will be much appreciated!
     
  2. Senshi

    Senshi

    Joined:
    Oct 3, 2010
    Posts:
    567
    If your app is lightweight enough, I'd say this approach looks fine. You already mention you're unloading resources no longer needed and are disabling inactive panels, so that all sounds good to me!

    As for updating your UI based on external data, I'd suggest taking a look at the WWW class; this allows you to fetch files/ data easily. You can then simply swap sprites or color based on question themes e.g. and set the question and answer texts, etc.

    On a completely different note, I am currently also using the Kivy UI framework for a different app, which is written in Python and also exports to Android and iOS. I have no idea how it compares performance-wise, but figured I'd just throw it out there for you to explore if you want. =) Good luck!
     
  3. animepauly

    animepauly

    Joined:
    Nov 9, 2013
    Posts:
    3
    Thanks for the tip! Yeah I couldn't think of a better way but I'm still kind of a noob at Unity so wanted to make sure I was going down the right path. Good luck with your app :)