Documentation

​
​

Development

User Acquisition

Monetization

Industry

Unity Studio

Open Unity Studio

Unity Studio

​
​
Unity Studio
  • What's new in Unity Studio
  • Introduction to Unity Studio
  • Launch Unity Studio
  • Create your first Unity Studio project
  • Develop with Unity Studio
    • The Unity Studio interface
    • Save your progress
    • GameObjects
    • Assets
    • Materials
    • Scene settings
    • Logic
      • Introduction to Logic
      • Create a Logic script
      • The Logic Editor interface
      • Methods, variables, and parameters
        • Introduction to variables, methods and parameters
        • Create a variable
        • New Variable window reference
        • Create a method
        • New Method window UI reference
      • Nodes
      • Logic examples
    • The UI Creator
    • Animation
    • AI features
  • Collaborate in Unity Studio
  • Export drafts to the Unity Editor
  • Publish and share
  • Troubleshooting Unity Studio issues
  • Report bugs and share feedback
  • Manage your analytics and marketing preferences
  1. Unity Studio
  2. Develop with Unity Studio
  3. Logic
  4. Methods, variables and parameters

Create a method

Instructions on how to create a method for your Logic script.
Read time 1 minute
Last updated 6 months 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. Make sure the name doesn't contain spaces.
    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.

Additional resources

  • New Method window UI reference
  • Create a variable
  • Introduction to variables, methods, and parameters

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Additional resources


Report a problem with this page