Day 2: Unity Basics

Today we took a closer look at Unity Hub, the file structure of a Unity Project, and made our first application… an eternal fountain of prefab boxes.

Future classes will feature more detailed write-ups as our projects have more step-by-step directions. For today, our recording is posted on the course Canvas site. A zipped version of our BoxFountain project is on the CMU Box site. (Link available on the right)

Here is the code that we created in class today:

BoxFountain.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BoxFountain : MonoBehaviour
{
    public GameObject myBox;
    // Start is called before the first frame update
    void Start()
    {
        Instantiate(myBox);
    }
    // Update is called once per frame
    void Update()
    {
        Instantiate(myBox);
    }
}