기술 자료

​
​

Development

User Acquisition

Monetization

산업 분야

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

New Variable window reference

A detailed description of each of the properties of the New Variable window.
읽는 시간 1분
최근 업데이트: 6달 전

Use the New Variable window to set up a new variable to use with your Logic script.

Property

Description

ScopeDecide how visible your variable is to other methods in your Logic:
  • Local: Only available inside a single method. Disappears when the method finishes.
  • Global: Available throughout your Logic script as long as the GameObject exists. Default.
Unique NameGive your variable a name that's easy to identify. Use descriptive names (for example,
Door_Anim
for a door's animation). Make sure the name doesn't contain spaces.
TypeChoose what kind of data your variable holds. For example, numbers, words, an object etc.
Default valueSet the initial value of your variable. This property only shows when you set Type to Bool, Float, Int, String, Vector3, or Vector2.

Type dropdown

The Type dropdown in the New Variable window includes the following options:

Option

Description

ObjectReference to a GameObject in your scene
BoolTrue/False (on/off)
FloatDecimal number
IntWhole number
StringText
Vector3/Vector2Position or direction in 3D/2D space
ColorColor value
TransformPosition, rotation, and scale info
ColliderBox, Capsule, Sphere, Mesh Collider
RigidbodyPhysics properties
Camera, Light, Material, UI Transform, Canvas, Button, Text, InputField, Animation, Image, Quaternion, Logic(Specialized references for UI and scene elements)

Additional resources

  • Create a variable
  • Create a method
  • New Method window UI reference

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.

  • 보고 있는 페이지
    • Type dropdown

    • Additional resources


이 페이지의 문제 보고