Documentation

Support

Unity Lite

Open Unity Lite

Unity Lite

New Method window UI reference

Reference information about the New Method window that you use to create a new method in a Logic.
Read time 1 minuteLast updated 2 days ago

Use the New Method window to add a new method in your Logic script.

New Method window properties

The following properties are available to customize in the New Method window:

Property

Description

Unique nameGive your method a clear, descriptive name. A clear name helps you and your team understand what the method does.
Return TypeSelect the type of value the method returns after it runs (for example, number, text, object). If you want a method to just perform actions (like move an object or play an animation) and doesn’t need to return a value, set the return type to Void. Void means the method doesn't return any value.
ParametersDefine any input parameters the method needs.

Parameter details

The Parameter section of the New Method window lets you add parameters to your method.

Property

Description

NameGive your parameter a clear, descriptive name. This helps you understand what value to pass into the method when you use it.
TypeSelect the type of value the parameter accepts (for example, number, text, object). This defines what kind of data you can pass into the method.
AddOnce you’ve set the name, return type, and any parameters, select this button to add the parameter to your method.