Skip to content

TRANSFORM

Lili edited this page Jul 5, 2026 · 14 revisions

TRANSFORM

class definition

Class Transform(string _name, float _x, float _y, float _xSize, float _ySize, string _spritePath) : Object displayed in scene (canvas) with or without a Behavior js script.

map.json stores the Transforms to be created during the initial load.

Inherited

  • String Transform.name : Transform's name (used for FindTransformByName, as seen below)
  • Float Transform.x : x-axis image's position in pixels
  • Float Transform.y : y-axis image's position in pixels
  • Float Transform.xSize : image's width in pixels
  • Float Transform.ySize : image's height in pixels
  • String Transform.spritePath : image's file path, which sources Transform.sprite, set None to set inactive object's scene display (Transform.isActive)
  • Bool Transform.isActive : true by default or false if sprite is null)
  • Image Transform.sprite : Image displayed in scene (canvas)
  • Behavior Transform.behavior : Behavior attached to the Transform see Behavior below)

Transform.SetActive(bool _isActive)

Show/hide Transform's image.

Transform.SetBehavior(string script_path)

Use script_path = path to the script attached to the Transform None to set Behavior to null.

Externals

  • List transforms : when a Transform constructor is called, it push itself in this global list
  • Transform FindTransformByName(string _name) : returns the first Transform whoes matches in transforms global list

Clone this wiki locally