# 로컬에서 불러오기

&#x20;&#x20;

### [이전 챕터](/unitygooglesheets/how-to-use/spreeadhseet-rules.md)를 완료했다면, 데이터를 불러오기위해 빈 스크립트를 생성하십시오.

![](/files/-MKuEWp4p4gYzIYh3I62)

### 아래와 같이 따라서 코드를 작성해보세요.

```csharp
void Awake()
{
    UnityGoogleSheet.LoadAllData(); 
    // UnityGoogleSheet.Load<DefaultTable.Data.Load>(); it's same!
    // or call DefaultTable.Data.Load(); it's same!
}
    
void Start()
{ 
    foreach (var value in DefaultTable.Data.DataList)
    {
        Debug.Log(value.index + "," + value.intValue + "," + value.strValue);
    } 
    var dataFromMap = DefaultTable.Data.DataMap[0];
    Debug.Log("dataFromMap : " + dataFromMap.index + ", " + dataFromMap.intValue + "," + dataFromMap.strValue);
}

```

위와 같이 코드를 작성후 로그를 확인해봅니다. 로그가 정상적으로 출력되면 구글시트로부터 데이터를 정상적으로 불러 온 것 입니다.

![](/files/-MKuFYRTvHRH1t7s7Bii)

데이터를 불러오는데 성공했습니다. 다음 페이지에서는 런타임 환경에서 데이터를 로드하는 방법을 알려드리겠습니다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shlifedev.gitbook.io/unitygooglesheets/how-to-use/dataload.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
