Skip to content

Component bindings

SDraw edited this page Jun 3, 2023 · 4 revisions

Refer to Unity's Component documentation for properties and methods description.

Properties

  • gameObject: get, GameObject
  • tag: get/set, string
  • transform: get, Transform

Methods

  • bool CompareTag(string tag)
  • object GetComponent(string name)
    • Note: Only Unity's own components can be retrieved with short name (Transform, NavMeshAgent and etc.), non-standart components (such as CVRLua.LuaScript) should be retrieved with full name.
    • Warning: Do not try to access components that don't have Lua bindings, because such components can't be detected by garbage collector.

Static methods

  • bool IsComponent(): checks if value is type of Component.

Notes

  • Inherits properties and methods from Object.