Distance Learning

Sample 1

Keenan Gray
20018__djfroyd__1-16-groovy-beat-and-stems.zip
351888__djfroyd__clap.wav
351889__djfroyd__bass.wav
351890__djfroyd__1-16-groove-synth.wav
351891__djfroyd__1-16-groove-beat.wav
351892__djfroyd__kick.wav
351893__djfroyd__hi-hat.wav

From freesound.org

Freesound files

Keenan Gray
20018__djfroyd__1-16-groovy-beat-and-stems.zip

Adding Materials

Keenan Gray
1 / 5

Animation in Unity

Keenan Gray
1 / 13

Model_File

Ray Majewski
Unity_Wind_Demo.fbx

Playing Sounds in Unity

Keenan Gray
1 / 7

Unity supports a range of sound files[wav,mp3,etc]

I downloaded several ".wav" files from freesound.org, but you can also record your own sounds using your phone.  You should also install Audacity, an easy to use sound editing program.   

Start by dragging and dropping the sounds into a folder in the editor.


Code to place in "update script" assigned to the gameobject with the audiosource

  if (Input.GetKeyDown(KeyCode.Alpha0))
        {
            GetComponent<AudioSource>().Stop();
            GetComponent<AudioSource>().Play();
        }


If you want multiple game objects to play sounds you can assign this script to each, with a few modifications

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Play : MonoBehaviour
{
    public KeyCode key;  
    // Start is called before the first frame update
    void Start()
    {
       
    }
    // Update is called once per frame
    void Update()
    {
          if (Input.GetKeyDown(key))
        {
            GetComponent<AudioSource>().Stop();
            GetComponent<AudioSource>().Play();
        }
    }
}

Then assign the key in the editor, as seen in the images above

Intro to Unity Programming

Keenan Gray
1 / 6

The world's of Unity are made up of individual pieces called "GameObjects". Each game object has a collection of components that dictate its behavior. Using programming (scripting) these behaviors can be expanded and manipulated.


In the example script we are manipulating a property on the rigidbody. We are applying a force based on keyboard input.

more information about rigidbody https://docs.unity3d.com/ScriptReference/Rigidbody.html


more information about input

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

Part 1: Drawing on the screen

Keenan Gray
1 / 1

Purpose: To introduce programming and use lines of code in order to manipulate a processing window.  We can see our changes to the code reflected in the editor.

Description: Processing's primary function is the ability to draw images on a screen. We can interact with, and manipulate these images via code.  There are variety of projects that can be created using processing including - interactive art pieces, video games, computer applications, and websites.

Instructions: In the desktop version of Processing or at https://editor.p5js.org/ enter the code seen below.

function setup() {
createCanvas(400, 400);
}

function draw() {
background(220);
}

This is the boilerplate code for your first ever program. 

Installing Processing

Keenan Gray
1 / 1

Processing download link: https://processing.org/download/


Special instructions for chromebook users:

  1. Follow the instructions here in order to enable the running of Linux apps on the chrome book.
  2. Download the 'Linux' version of processing from the website above
  3. Move the downloaded file "ends in tgz" into the Linux folder of the chromebook.
  4. You will have to unzip the tgz file, instructions can be found here (https://www.businessinsider.com/how-to-unzip-files-on-chromebook)


if for some reason the software cannot be installed there is a nearly identical browser based version of processing called "p5js" 

https://editor.p5js.org/


Precedent - Chairs out of everything

Tiandra Ray