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
        • Operator nodes
        • Utility nodes
          • Math node
          • Quaternion node
          • Vector2 node
          • Vector3 node
          • Vector4 node
          • Float node
          • Int node
          • Physics node
          • Input node
          • Time node
          • Random node
          • Cursor node
          • Debug node
          • Convert node
      • 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. Utility nodes

Convert node

Convert values between different types, such as from a float to an integer.
Read time 1 minute
Last updated 6 months ago

The Convert node converts values to different types. This is useful when you need to change the type of a value to use it with other nodes that require a specific type. For example, you might want to convert a float to an integer to use it as an index in an array.

Methods

Expand the Convert node to view available variables and methods you can use:

Method

Return type

Description

To Int
int
Converts a float, string, or bool value to an integer by rounding it to the nearest whole number.
To Float
float
Converts a string, int, or bool value to a float.
To String
string
Converts an int, float, or bool value to its string representation. This is useful if you want to display values in the UI, log information for debugging purposes, or when you need to concatenate values into a message.
To Bool
bool
Converts an int, float, or string value to a bool value. The conversion rules depend on the type of the input value. For example, if you convert a float or int, any non-zero value converts to true, while zero converts to false. When you convert a string, an empty string converts to false, while any non-empty string converts to true. This is useful to evaluate conditions or control the flow of your Logic script.

Additional resources

  • Utility nodes

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

    • Additional resources


Report a problem with this page