.. include:: ../_header.rst Variable properties ~~~~~~~~~~~~~~~~~~~ The `variable properties`_ are introduced by the |SceneEditor|_ to be used by the |OutlineView|_ and the `scene compiler `_. Name property ````````````` This name is auto generated by the editor: .. image:: ../images/scene-editor-name-prop-1-202203281224.webp :alt: Name property in Inspector view. It is used as the label in the |OutlineView|_: .. image:: ../images/scene-editor-name-prop-2-202203281224.webp :alt: Name property in Outlime. And as a variable name in the generated code: .. image:: ../images/scene-editor-name-prop-3-202203281224.webp :alt: Name property in code. Display Name property ````````````````````` You can change the default text of the game object in the |OutlineView|_ by setting the **Display Name** property. This display name is used only by the UI. .. image:: ../images/scene-editor-variable-display-name-20240109.webp :alt: Display Name property .. image:: ../images/scene-editor-variable-display-name-outline-20240109.webp :alt: Display name in Outline view. Game Object Name property ````````````````````````` The **GO Name** property indicates if the previous **Name** property's value will be set as value to the `Game Object's name property `_. Check the **GO Name** property: .. image:: ../images/scene-editor-go-name-prop-3-202203281224.webp :alt: Enables setting the Game Object's name property. For generating the ``name`` value in code: .. image:: ../images/scene-editor-go-name-code-prop-3-202203281224.webp :alt: Set the variable name as the GO name's value. Type property ````````````` This property shows the type of the selected object. In the case of prefabs_, it shows the name of the prefab and the Phaser_ type that is the root of the prefab. For example: ``prefab PlayButton (Image)``. Also, you can click on the type name to change the type of the selected objects. It opens the `Replace Type dialog <./replace-object-type.html>`_: .. image:: ../images/scene-editor-variable-type-prop-09182020.webp :alt: Replace Type dialog. Scope property `````````````` The scope property refers to the lexical scope of the variable that references the object. The possible values are: * ``LOCAL``: The variable is local to the creation of the object. It is optional, the compiler may generate it or not according if the object properties are modified. * ``METHOD``: The variable is available in the method's scope. * ``CLASS``: The variable is assigned to a private class field. The object is accessible from any other method of the class. * ``PUBLIC``: Like the ``CLASS`` scope, but it is referenced by a public field. The object is accessible to any client of the class. * ``NESTED_PREFAB``: Like ``PUBLIC``, but the object is also available as `nested prefab <./nested-prefab.html>`_ instance in the Scene Editor. It means, you can change its properties using the scene editor. By default, the scope is set to ``LOCAL``. In previous versions of the editor, the default value was ``METHOD``, but now we are using ``METHOD`` to ensuring the |SceneCompiler|_ generates a variable for the object.