Variable properties

The variable properties are introduced by the Scene Editor to be used by the Outline view and the scene compiler.

Name property

This name is auto generated by the editor:

Name property in Inspector view.

It is used as the labal in the Outline view:

Name property in Outlime.

And as a variable name in the generated code:

Name property in code.

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:

Enables setting the Game Object's name property.

For generating the name value in code:

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 Type dialog.

Scope property

The scope property refers to the lexical scope of the variable that references the object. The possible values are:

  • Class: The variable is assigned to a private class field. The object is accessible from any other method of the class.

  • Method: The variable is local to the method.

  • Public: Like the Class scope, but it is referenced by a public field. The object is accessible to any client of the class.

By default, the scope is set to Method.