Documentation

Support

Unity Studio

Open Unity Studio

Unity Studio

Logic component

Add logic to your GameObject.
Read time 1 minuteLast updated 2 days ago

You can add Logic scripts to your GameObject to give your objects behaviors and functionality. You can add multiple Logic scripts to each GameObject. This follows an object-oriented approach: every object carries its own scripts that control its actions. For more information about scripting with Unity Studio including examples, refer to Logic.

Logic component example

You might have a car object with 3 different scripts that each perform a different task:
  • Movement
  • Color change
  • Car model type change
The car object might also have 4 wheel objects each with a script that handle the wheel's rotation.

Logic component properties

The Logic component has the following properties:

Property

Description

EditOpen the Logic Editor and edit your script.
Options (...)Expand this menu to show options to remove the script from the GameObject or edit the script.
VariablesIf your script has public variables, they show in the Inspector window, where you can set these variables.

Additional resources