Skip to content

daltonbr/Queries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Queries

This is a code assignment in Unity3D πŸ‘¨πŸ»β€πŸ’»
The objective is to work with some concepts:

  • JSON files (in Unity3d) πŸ€·πŸ»β€
  • WebRequests (from a webAPI)
  • Dinamic scrollable lists (in Unity UI)

Final Animation
Application flow

Youtube Teaser

The assignment

The task is to search programs from the Yle API

  • The application should have an input field where the user can provide what programs to search for (a search query).
  • The Finnish title of each result should be displayed in a scrollable list.
  • When submitting a search, only the first 10 results should be retrieved from the API.
  • When the user scrolls to the last few items in the list, the next 10 results should be appended to the list.
  • Pressing on the row should display more details about the program. For this you can select any 5 revelant fields from the JSON.

Technologies to use

  • Unity UI
  • UnityWebRequest
  • Any JSON library you prefer

Results

  • I find that the Unity Json Utility has some limitations (e.g. we can't easily import an array of objects)
  • I found (and use here) a port Json.Net.Unity3D of the famous Newtonsoft Json.NET library
  • To build to iOS I have to tweak some things in XCode (more information in the Port github above)
  • Essentialy it's a good practice to use Coroutines when doing webRequest so we have non-blocking requests
  • Visual Studio has awesome tools to "rebuild" a Json Structure into an OOP-ish object

Releases

No releases published

Packages

No packages published

Languages