# While Coding
There are two way to Scripting with GameTickSystem.
## 【Create Script from my options】
### 1. Create New Script from **Assets/Create/NaiveAPI/C# TickScript**


### 2. Setting update frequency
Change tickUpdate.Subscribe()'s param.
Default is Update TickRate.

:::info
**Update with every Tick Rate**
``` csharp=
tickUpdate.Subscribe();
or tickUpdate.Subscribe(1);
or tickUpdate.Subscribe(false);
```
**Update with Custom tick interval** (based on Tick Rate)
``` csharp=
tickUpdate.Subscribe(int updateFrequency);
```
**Update with Real Tick** (change tick rate will not effect on this):
``` csharp=
tickUpdate.Subscribe(true);
```
:::
---
## 【Add ITickUpdate by yourself】
### 1. Add Interface "ITickUpdate".

### 2. Coding in TickUpdate() (same as in Update()).

### 3. Subscribe to GameTickManager at Start() or Awake().

---
## 【Things you have to know】
:::danger
- **With out Subscribe (  and others ),
your code in TickUpdate() will not implement by GameTickManager.**
- **Do not use  it make many problem
See Also :** [**Why GetKey make problem in GameTickSystem**](/Il4jc_pqRrWfSv4s9RRLGg)
**Use this to replace it.**
``` csharp=
private GameTickManager gameTick;
private void Start()
{
gameTick = GameTickManager.Instance;
}
public void TickUpdate()
{
gameTick.GetKey(KeyCode.Mouse0);
gameTick.GetKeyDown(KeyCode.Mouse0);
gameTick.GetKeyUp(KeyCode.Mouse0);
}
/*-------------------- or -----------------------*/
public void TickUpdate()
{
GameTickManager.Instance.GetKey(KeyCode.Mouse0);
GameTickManager.Instance.GetKeyDown(KeyCode.Mouse0);
GameTickManager.Instance.GetKeyUp(KeyCode.Mouse0);
}
```
:::
:::info
- **You can use  to stop update this script,
also can restart by use Subscribe() again.**
:::