Skip to content

Commit ed229d7

Browse files
authored
Merge pull request #2 from naichilab/issue-1/continue-between-scenes
シーン切り替え対応
2 parents b70961d + fe99a1c commit ed229d7

File tree

5 files changed

+45
-22
lines changed

5 files changed

+45
-22
lines changed

Assets/unityroom/Api/UnityroomApiClient.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ public static IUnityroomApiClient Instance
3636

3737
private void Awake()
3838
{
39+
// 2つ目以降のClientは破棄する
40+
if ((UnityroomApiClient)Instance != this)
41+
{
42+
Debug.LogWarning($"[unityroom] 複数のUnityroomApiClientが見つかりました。重複したインスタンスを破棄します。", gameObject);
43+
Destroy(gameObject);
44+
}
45+
46+
// シーンを切り替えても破棄されないようにする
47+
DontDestroyOnLoad(gameObject);
48+
3949
if (string.IsNullOrEmpty(HmacKey))
4050
{
4151
Debug.LogError($"[unityroom] インスペクターにてHMAC認証用キーをセットしてください。", gameObject);

Assets/unityroom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.unityroom.client",
3-
"version": "0.9.4",
3+
"version": "0.9.5",
44
"displayName": "Unityroom Client Library",
55
"unity": "2020.3",
66
"description": "Unityroom API Client Library.",

Packages/manifest.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"dependencies": {
3-
"com.unity.collab-proxy": "2.0.0",
4-
"com.unity.feature.2d": "1.0.0",
5-
"com.unity.ide.rider": "3.0.18",
6-
"com.unity.ide.visualstudio": "2.0.17",
3+
"com.unity.collab-proxy": "2.0.7",
4+
"com.unity.feature.2d": "2.0.0",
5+
"com.unity.ide.rider": "3.0.24",
6+
"com.unity.ide.visualstudio": "2.0.18",
77
"com.unity.test-framework": "1.1.33",
88
"com.unity.textmeshpro": "3.0.6",
9-
"com.unity.timeline": "1.7.2",
9+
"com.unity.timeline": "1.7.5",
1010
"com.unity.ugui": "1.0.0",
11-
"com.unity.visualscripting": "1.8.0",
11+
"com.unity.visualscripting": "1.9.0",
1212
"com.unity.modules.ai": "1.0.0",
1313
"com.unity.modules.androidjni": "1.0.0",
1414
"com.unity.modules.animation": "1.0.0",

Packages/packages-lock.json

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"dependencies": {
33
"com.unity.2d.animation": {
4-
"version": "9.0.1",
4+
"version": "9.0.3",
55
"depth": 1,
66
"source": "registry",
77
"dependencies": {
@@ -13,6 +13,18 @@
1313
},
1414
"url": "https://packages.unity.com"
1515
},
16+
"com.unity.2d.aseprite": {
17+
"version": "1.0.1",
18+
"depth": 1,
19+
"source": "registry",
20+
"dependencies": {
21+
"com.unity.2d.sprite": "1.0.0",
22+
"com.unity.2d.common": "6.0.6",
23+
"com.unity.mathematics": "1.2.6",
24+
"com.unity.modules.animation": "1.0.0"
25+
},
26+
"url": "https://packages.unity.com"
27+
},
1628
"com.unity.2d.common": {
1729
"version": "8.0.1",
1830
"depth": 2,
@@ -51,7 +63,7 @@
5163
"dependencies": {}
5264
},
5365
"com.unity.2d.spriteshape": {
54-
"version": "9.0.1",
66+
"version": "9.0.2",
5567
"depth": 1,
5668
"source": "registry",
5769
"dependencies": {
@@ -71,7 +83,7 @@
7183
}
7284
},
7385
"com.unity.2d.tilemap.extras": {
74-
"version": "3.0.3",
86+
"version": "3.1.1",
7587
"depth": 1,
7688
"source": "registry",
7789
"dependencies": {
@@ -83,7 +95,7 @@
8395
"url": "https://packages.unity.com"
8496
},
8597
"com.unity.burst": {
86-
"version": "1.8.2",
98+
"version": "1.8.8",
8799
"depth": 3,
88100
"source": "registry",
89101
"dependencies": {
@@ -92,7 +104,7 @@
92104
"url": "https://packages.unity.com"
93105
},
94106
"com.unity.collab-proxy": {
95-
"version": "2.0.0",
107+
"version": "2.0.7",
96108
"depth": 0,
97109
"source": "registry",
98110
"dependencies": {},
@@ -116,21 +128,22 @@
116128
"url": "https://packages.unity.com"
117129
},
118130
"com.unity.feature.2d": {
119-
"version": "1.0.0",
131+
"version": "2.0.0",
120132
"depth": 0,
121133
"source": "builtin",
122134
"dependencies": {
123-
"com.unity.2d.animation": "9.0.1",
135+
"com.unity.2d.animation": "9.0.3",
124136
"com.unity.2d.pixel-perfect": "5.0.3",
125137
"com.unity.2d.psdimporter": "8.0.2",
126138
"com.unity.2d.sprite": "1.0.0",
127-
"com.unity.2d.spriteshape": "9.0.1",
139+
"com.unity.2d.spriteshape": "9.0.2",
128140
"com.unity.2d.tilemap": "1.0.0",
129-
"com.unity.2d.tilemap.extras": "3.0.3"
141+
"com.unity.2d.tilemap.extras": "3.1.1",
142+
"com.unity.2d.aseprite": "1.0.1"
130143
}
131144
},
132145
"com.unity.ide.rider": {
133-
"version": "3.0.18",
146+
"version": "3.0.24",
134147
"depth": 0,
135148
"source": "registry",
136149
"dependencies": {
@@ -139,7 +152,7 @@
139152
"url": "https://packages.unity.com"
140153
},
141154
"com.unity.ide.visualstudio": {
142-
"version": "2.0.17",
155+
"version": "2.0.18",
143156
"depth": 0,
144157
"source": "registry",
145158
"dependencies": {
@@ -175,7 +188,7 @@
175188
"url": "https://packages.unity.com"
176189
},
177190
"com.unity.timeline": {
178-
"version": "1.7.2",
191+
"version": "1.7.5",
179192
"depth": 0,
180193
"source": "registry",
181194
"dependencies": {
@@ -196,7 +209,7 @@
196209
}
197210
},
198211
"com.unity.visualscripting": {
199-
"version": "1.8.0",
212+
"version": "1.9.0",
200213
"depth": 0,
201214
"source": "registry",
202215
"dependencies": {

ProjectSettings/ProjectVersion.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
m_EditorVersion: 2022.2.8f1
2-
m_EditorVersionWithRevision: 2022.2.8f1 (996aee41dc57)
1+
m_EditorVersion: 2022.3.10f1
2+
m_EditorVersionWithRevision: 2022.3.10f1 (ff3792e53c62)

0 commit comments

Comments
 (0)