Documentation

Support

Unity Lite

Open Unity Lite

Unity Lite

Create a method

Instructions on how to create a method for your Logic script.
Read time 1 minuteLast updated 2 days ago

Create methods to organize your Logic script into smaller, reusable sections of code. To create a method, use the following steps:
  1. Open your Logic script.
  2. Select the Add (+) icon next to Methods. The New Method window displays.
  3. Change the settings to your preferences. For information about each of the settings, refer to Methods window UI reference.
  4. If you want to add parameters to your method:
    1. In the Parameters section, enter a name for your parameter.
    2. Select the type of value the parameter accepts from the Type dropdown.
    3. Select Add to add the parameter to your method.
  5. Select Create.