Skip to content

3. Unity Part

Jonathan Ziesmer edited this page Nov 12, 2018 · 9 revisions
  • Located in the calendar_ui directory

  • Using Unity 2018.2, 2D

    • 2D instead of 3D so we can start simple
  • Using Visual Studio 2017 and Rider 2018.2.3

  • Unity projects are organized by scene. Each scene can have associated GameObjects. GameObjects can have associated components.

  • For the purposes of this project, think of scenes like a web page.

  • When you create a new scene, always save it in /calendar_ui/Assets/Scenes/

GameObjects are fairly static. In order to make them change/move/interactable, you have to write a C# script. Always store new scripts in /calendar_ui/Assets/Scripts/

Basic parts of a scene:

Each scene is going to have each of the following:

  1. Main Camera - The screen space that will be visible to the user.
  2. Canvas - A container to hold all the UI elements in the scene.
  3. Event System - How user input is handled. This will be added automatically when you add a canvas.

As you create a scene, add an entry for it on this page following the pattern of the entries below. List what it does and any comments/explanations you have for how you structured it. This will be super important for in case you get stuck. It will make it way easier for everyone else to help you.

Make sure your Game Aspect Ratio is set to 2880 x 1440.

Note: All scene functionality that involves communicating with the server will be taken care of in the protocol part. Don't worry about it yet for the Unity part.

Login scene

The Login scene needs to be able to:

  1. Authenticate a user with the server
  2. Initiate change to CalendarView scene upon successful login
  3. Initiate change to CreateAccount scene if the user doesn't already have an account

CreateAccount scene

The CreateAccount scene needs to be able to:

  1. Take user input for data necessary to create an account (see Database Page for what fields to include)
  2. Pass that data on to the server
  3. Return user to the login scene

CalendarView scene

The CalendarView scene needs to be able to:

  1. Get a user's data from the server
  2. Display that data to the user (see Database Page for what data to include)
  3. Initiate the change to the EditEvent scene when an event is selected to be edited
  4. Initiate the change to the EditEvent scene when the user creates a new event
  5. Initiate change to Login scene when the user logs out

EditEvent scene

The EditEvent scene needs to be able to:

  1. Get event data, if it exists
  2. Allow user to fill in/edit event data (see Database Page for what fields to include)
  3. Initiate the change to the CalendarView scene when the user finishes editing the event
  4. Submit new event/new event data to server

Possible resource for getting user input:

https://docs.unity3d.com/ScriptReference/Input.html

Clone this wiki locally