Project
Beginner Gameplay Scripting
Variables and Functions
Tutorial
Beginner
10 Mins
Unity Technologies
Overview
You have completed 0% of this Tutorial.
1.
Variables and Functions
Summary
What are Variables and Functions, and how do they store and process information for us?
Language
English
Recommended Unity Versions
4
1.
Variables and Functions
using UnityEngine; using System.Collections; public class VariablesAndFunctions : MonoBehaviour { int myInt = 5; void Start () { myInt = MultiplyByTwo(myInt); Debug.Log (myInt); } int MultiplyByTwo (int number) { int ret; ret = number * 2; return ret; } }

Woohoo! You nailed this tutorial.
Continue rocking your Beginner Gameplay Scripting project.
Next Step:
Conventions and Syntax
Tutorial
Beginner
15 Mins
Unity Technologies