# deviceUniqueIdentifierが使えない

* WebGL では `deviceUniqueIdentifier` は使えません
* ので、 UUID を生成するコードを 内部プロジェクトでは追加した。

* 抜粋したコード

```c
        ...
        string playerId = PlayerPrefs.GetString("uuid");
        if (string.IsNullOrEmpty(playerId)) {
          // GUID の生成
          System.Guid guid = System.Guid.NewGuid();
          playerId = guid.ToString();

          PlayerPrefs.SetString("uuid", playerId);
          PlayerPrefs.Save();
	}
        ...
```

* そんなに難しい話ではないので、省略

---

## Page Navigation

- Canonical URL: https://tips.weseek.co.jp/Tips/Unity/WebGL/UUID生成(deviceUniqueIdentifierが使えない)
- Permalink: https://tips.weseek.co.jp/5fc0abb68b05ce0048ff59b5
- Parent: [WebGL](/5fc0a9058b05ce0048ff593c.md)
- Children: 0 total
- Total descendants: 0
- Siblings: 5 total
  - [FPSを無理やり上げる](/5fc0a8df8b05ce0048ff592e.md)
  - [WebGLNativeInputPlugin](/5fc0a9888b05ce0048ff5958.md)
  - [メモリ削減手法](/5fc0a9e08b05ce0048ff5966.md)
  - [動画を再生する(WebGLMovieTexture)](/5fc0ab008b05ce0048ff5986.md)
  - [成果物構成-ブートプロセス](/5fc0ac598b05ce0048ff59d6.md)
- Last updated: 2020-11-27T07:33:10.978Z by shinichi
- Full page listing (all children regardless of count): https://tips.weseek.co.jp/_api/v3/page-listing/children?id=5fc0abb68b05ce0048ff59b5
