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
        • Event Listener nodes
        • Event nodes
        • Action nodes
        • Constant nodes
        • Flow Control nodes
          • If node
          • If else node
          • For loop node
          • While loop node
          • For each loop node
          • Return node
          • Continue loop node
          • Break loop node
        • Operator nodes
        • Utility 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. Nodes
  5. Flow Control nodes

While loop node

Repeatedly run a set of actions while a condition is true.
Read time 1 minute
Last updated 10 months ago

Use the While loop node to run actions repeatedly within a single frame, as long as the condition is true. All iterations happen immediately in that frame.
To stop the loop, you must set the condition to false. If the condition never becomes false, the application can stall. A built-in safety limit stops the loop after 1000 iterations in one frame.

Sockets

Socket

Type

Description

Condition
Bool
The true/false check that controls the loop. Iterations run immediately while true. You must set this to false to stop execution.
Then
Event
(output)
Fires once per iteration during the current frame, for as long as the condition remains true (up to 1000 iterations).

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


Report a problem with this page