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
        • Use a button to transform a GameObject
        • Hide or show a User Interface (UI) element
        • Trigger an animation on key press
        • Adjust scene lighting with a button
        • Interact with an asset after an event
        • Display the name of a GameObject on hover
        • Enable or disable a property on a GameObject
        • Play audio when you click an object
        • Mute and unmute audio with the toggle element
        • Use sliders to change a material's color
    • 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

Logic examples

Learn how to use Logic with step-by-step use cases.
Read time 1 minute
Last updated 7 months ago

Use a button to transform a GameObject
Transform a GameObject when you click on a button.
Hide or show a User Interface (UI) element
Hide or show a UI element after a set time delay.
Trigger an animation with a key press
Trigger an animation from the Animation Director when the user presses a specific key.
Adjust scene lighting with a button
Change the scene's light color or intensity when the user clicks a button.
Interact with an asset after an event
Interact with a GameObject based on a specific event, such as a button click.
Display the name of a GameObject on hover
Display the name of a GameObject when the user hovers over it with their cursor.
Enable or disable a property on a GameObject
Change the enabled state of a GameObject's properties.
Play audio when you click an object
Play audio on an object when the user clicks on it.
Mute and unmute audio with the toggle element
Use a toggle to change an audio source's mute state.
Use sliders to change a material's color
Set up 3 sliders to control the red, green, and blue components of a material's color.

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.


    Report a problem with this page