> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# isrenderobj

> 返回该值是否为带有 Drawing object type 的 object。这只是 methods check；不会检查底层 Drawing object 是否仍然 active、tracked 或 destroyed。 the Drawing API 只在 the required rendering environment is active 为 true 时注册此 API；如果该检查为 false，initializer 会在创建这些 globals 之前返回。

<div className="real-function-page">
  ```lua theme={null}
  isrenderobj(object: any): boolean
  ```

  ## 参数

  <ParamField path={"object"} type={"any"} required>
    要测试的值。non-object values 以及没有 Drawing object type 的 object 会返回 false。
  </ParamField>

  ## 返回值

  <ResponseField name={"isDrawingObject"} type={"boolean"}>
    当值是 methods 匹配 RealDrawingObject 的 object 时为 True；否则为 false。
  </ResponseField>

  ## 示例

  Check whether a value has Real's Drawing userdata metatable.

  ```lua theme={null}
  local square = Drawing.new("Square")

  print(isrenderobj(square))
  square:Destroy()
  print(isrenderobj(square))
  print(isrenderobj({}))
  ```
</div>
