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
      • 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

Create a Logic script

Instructions on how to set up a Logic script.
Read time 1 minute
Last updated 2 months 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
  • From the Project panel

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. Make sure the name doesn't contain spaces.
  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 Script. Unity Studio creates a new Logic script in the folder.
  4. Enter a name for your script and press Enter. Make sure the name doesn't contain spaces.
  5. Double-click the new script to open the Logic Editor.
The Logic Editor opens allowing you to configure your new Logic script.

Additional resources

  • Introduction to Logic
  • The Logic Editor interface
  • Methods and variables
  • Nodes
  • Logic examples

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
    • From the Inspector panel

    • From the Project panel

    • Additional resources


Report a problem with this page