> ## 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.

# getgenv

> LUA_ENVIRONINDEX를 push하여 current executor environment table을 반환합니다. 이 function은 arguments를 받지 않고 exactly one value를 반환하며 registered alias가 없습니다. repository의 call-sites는 returned table을 사용해 __siApiCache 및 saveinstance 같은 shared executor globals를 읽고 씁니다.

<div className="real-function-page">
  ```lua theme={null}
  getgenv(): table
  ```

  ## 반환값

  <ResponseField name={"environment"} type={"table"}>
    이 state의 LUA\_ENVIRONINDEX에 현재 저장된 table.
  </ResponseField>

  ## 예제

  Read and write values on the current executor environment table.

  ```lua theme={null}
  local env = getgenv()

  env.RealDocsValue = "ready"

  print(getgenv().RealDocsValue)
  ```
</div>
