Documentation

Support

Unity Lite

Open Unity Lite

Unity Lite

Create a Logic script

Instructions on how to set up a Logic script.
Read time 1 minuteLast updated 2 days ago

Add Logic scripts to your objects to give them interactivity and new behaviors. This information explains how to create a new Logic script. There are two ways to create a new Logic script:

From the Inspector panel

It's useful to add a Logic component to a GameObject from the Inspector panel because the Logic script automatically attaches to that object.
  1. Select a GameObject in your scene. The Inspector panel shows.
  2. Select Add Component.
  3. In the NEW LOGIC section, enter a name of your new Logic script.
  4. Select Create and Edit, or press the Enter key.

From the Project panel

To create a Logic script from the Project panel:
  1. In the Project panel, select the My Logic folder.
  2. Select Add (+).
  3. Select New Script. Unity Lite creates a new Logic script in the folder.
  4. Enter a name for your script and press Enter.
  5. Double-click the new script to open the Logic Editor.
The Logic Editor opens allowing you to configure your new Logic script.