Skip to content

Commit a81e76f

Browse files
committed
Merge branch 'release/v4.1.0' into main
2 parents 8f02c60 + a656f4e commit a81e76f

File tree

49 files changed

+1667
-1288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1667
-1288
lines changed

.github/latest.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11

22
## Changelog
33

4-
### Updates
5-
- fixed an issue causing avatars to be stored locally even if caching was disabled by @harrisonhough in [#150](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/150)
4+
### Updated
5+
- replaced API URLs with model URLs for shortcodes by @rk132 in [#152](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/152)
6+
- updated render api and samples @rYuuk in [#147](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/147)
7+
8+
### Added
9+
- Added app id to setup guide by @ryuuk in [#145](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/145)

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

6+
## [4.1.0] - 2023.11.29
7+
8+
### Updated
9+
- replaced API URLs with model URLs for shortcodes by @rk132 in [#152](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/152)
10+
- updated render api and samples @rYuuk in [#147](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/147)
11+
12+
### Added
13+
- Added app id to setup guide by @ryuuk in [#145](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/145)
14+
615
## [4.0.1] - 2023.11.14
716

817
### Fixed

Editor/Analytics/AmplitudeEditorLogger.cs

Lines changed: 77 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using ReadyPlayerMe.Core.Editor;
44
using UnityEditor;
55
using UnityEngine;
6+
using static ReadyPlayerMe.Core.Analytics.Constants;
67

78
namespace ReadyPlayerMe.Core.Analytics
89
{
@@ -59,190 +60,200 @@ public void LogOpenProject()
5960
{
6061
if (!isEnabled) return;
6162
GenerateSessionId();
62-
AmplitudeEventLogger.LogEvent(Constants.EventName.OPEN_PROJECT);
63+
AmplitudeEventLogger.LogEvent(EventName.OPEN_PROJECT);
6364
}
6465

6566
public void LogCloseProject()
6667
{
67-
LogEvent(Constants.EventName.CLOSE_PROJECT);
68+
LogEvent(EventName.CLOSE_PROJECT);
6869
}
6970

7071
public void LogOpenDocumentation(string target)
7172
{
72-
LogEvent(Constants.EventName.OPEN_DOCUMENTATION, new Dictionary<string, object>
73+
LogEvent(EventName.OPEN_DOCUMENTATION, new Dictionary<string, object>
7374
{
74-
{ Constants.Properties.TARGET, target }
75+
{ Properties.TARGET, target }
7576
});
7677
}
7778

7879
public void LogOpenFaq(string target)
7980
{
80-
LogEvent(Constants.EventName.OPEN_FAQ, new Dictionary<string, object>
81+
LogEvent(EventName.OPEN_FAQ, new Dictionary<string, object>
8182
{
82-
{ Constants.Properties.TARGET, target }
83+
{ Properties.TARGET, target }
8384
});
8485
}
8586

8687
public void LogOpenDiscord(string target)
8788
{
88-
LogEvent(Constants.EventName.OPEN_DISCORD, new Dictionary<string, object>
89+
LogEvent(EventName.OPEN_DISCORD, new Dictionary<string, object>
8990
{
90-
{ Constants.Properties.TARGET, target }
91+
{ Properties.TARGET, target }
9192
});
9293
}
9394

9495
public void LogLoadAvatarFromDialog(string avatarUrl, bool eyeAnimation, bool voiceHandler)
9596
{
96-
LogEvent(Constants.EventName.LOAD_AVATAR_FROM_DIALOG, new Dictionary<string, object>
97+
LogEvent(EventName.LOAD_AVATAR_FROM_DIALOG, new Dictionary<string, object>
9798
{
98-
{ Constants.Properties.AVATAR_URL, avatarUrl },
99-
{ Constants.Properties.EYE_ANIMATION, eyeAnimation },
100-
{ Constants.Properties.VOICE_HANDLER, voiceHandler }
99+
{ Properties.AVATAR_URL, avatarUrl },
100+
{ Properties.EYE_ANIMATION, eyeAnimation },
101+
{ Properties.VOICE_HANDLER, voiceHandler }
101102
});
102103
}
103104

104105
public void LogUpdatePartnerURL(string previousSubdomain, string newSubdomain)
105106
{
106-
LogEvent(Constants.EventName.UPDATED_PARTNER_URL, new Dictionary<string, object>
107+
LogEvent(EventName.UPDATED_PARTNER_URL, new Dictionary<string, object>
107108
{
108-
{ Constants.Properties.PREVIOUS_SUBDOMAIN, previousSubdomain },
109-
{ Constants.Properties.NEW_SUBDOMAIN, newSubdomain }
109+
{ Properties.PREVIOUS_SUBDOMAIN, previousSubdomain },
110+
{ Properties.NEW_SUBDOMAIN, newSubdomain }
110111
}, new Dictionary<string, object>
111112
{
112-
{ Constants.Properties.SUBDOMAIN, newSubdomain }
113+
{ Properties.SUBDOMAIN, newSubdomain }
113114
});
114115
}
115116

116117
public void LogOpenDialog(string dialog)
117118
{
118-
LogEvent(Constants.EventName.OPEN_DIALOG, new Dictionary<string, object>
119+
LogEvent(EventName.OPEN_DIALOG, new Dictionary<string, object>
119120
{
120-
{ Constants.Properties.DIALOG, dialog }
121+
{ Properties.DIALOG, dialog }
121122
});
122123
}
123-
124+
124125
public void LogBuildApplication(string target, string appName, bool productionBuild)
125126
{
126-
LogEvent(Constants.EventName.BUILD_APPLICATION, new Dictionary<string, object>
127+
LogEvent(EventName.BUILD_APPLICATION, new Dictionary<string, object>
127128
{
128-
{ Constants.Properties.TARGET, target },
129-
{ Constants.Properties.APP_NAME, appName },
130-
{ Constants.Properties.PRODUCTION_BUILD, productionBuild },
131-
{ Constants.Properties.APP_IDENTIFIER, Application.identifier }
129+
{ Properties.TARGET, target },
130+
{ Properties.APP_NAME, appName },
131+
{ Properties.PRODUCTION_BUILD, productionBuild },
132+
{ Properties.APP_IDENTIFIER, Application.identifier }
132133
});
133134
}
134135

135136
public void LogMetadataDownloaded(double duration)
136137
{
137-
LogEvent(Constants.EventName.METADATA_DOWNLOADED, new Dictionary<string, object>
138+
LogEvent(EventName.METADATA_DOWNLOADED, new Dictionary<string, object>
138139
{
139-
{ Constants.Properties.DURATION, duration }
140+
{ Properties.DURATION, duration }
140141
});
141142
}
142143

143144
public void LogAvatarLoaded(double duration)
144145
{
145-
LogEvent(Constants.EventName.AVATAR_LOADED, new Dictionary<string, object>
146+
LogEvent(EventName.AVATAR_LOADED, new Dictionary<string, object>
146147
{
147-
{ Constants.Properties.DURATION, duration }
148+
{ Properties.DURATION, duration }
148149
});
149150
}
150151

151152
public void LogCheckForUpdates()
152153
{
153-
LogEvent(Constants.EventName.CHECK_FOR_UPDATES);
154+
LogEvent(EventName.CHECK_FOR_UPDATES);
154155
}
155156

156157
public void LogSetLoggingEnabled(bool isLoggingEnabled)
157158
{
158-
LogEvent(Constants.EventName.SET_LOGGING_ENABLED, new Dictionary<string, object>
159+
LogEvent(EventName.SET_LOGGING_ENABLED, new Dictionary<string, object>
159160
{
160-
{ Constants.Properties.LOGGING_ENABLED, isLoggingEnabled }
161+
{ Properties.LOGGING_ENABLED, isLoggingEnabled }
161162
});
162163
}
163164

164165
public void LogSetCachingEnabled(bool isCachingEnabled)
165166
{
166-
LogEvent(Constants.EventName.SET_CACHING_ENABLED, new Dictionary<string, object>
167+
LogEvent(EventName.SET_CACHING_ENABLED, new Dictionary<string, object>
167168
{
168-
{ Constants.Properties.CACHING_ENABLED, isCachingEnabled }
169+
{ Properties.CACHING_ENABLED, isCachingEnabled }
169170
});
170171
}
171172

172173
public void LogClearLocalCache()
173174
{
174-
LogEvent(Constants.EventName.CLEAR_LOCAL_CACHE);
175+
LogEvent(EventName.CLEAR_LOCAL_CACHE);
175176
}
176177

177178
public void LogViewPrivacyPolicy()
178179
{
179-
LogEvent(Constants.EventName.PRIVACY_POLICY);
180+
LogEvent(EventName.PRIVACY_POLICY);
180181
}
181182

182183
public void LogShowInExplorer()
183184
{
184-
LogEvent(Constants.EventName.SHOW_IN_EXPLORER);
185+
LogEvent(EventName.SHOW_IN_EXPLORER);
185186
}
186187

187188
public void LogFindOutMore(HelpSubject subject)
188189
{
189-
LogEvent(Constants.EventName.FIND_OUT_MORE, new Dictionary<string, object>
190+
LogEvent(EventName.FIND_OUT_MORE, new Dictionary<string, object>
190191
{
191-
{ Constants.Properties.CONTEXT, helpDataMap[subject] }
192+
{ Properties.CONTEXT, helpDataMap[subject] }
192193
});
193194
}
194195

195196
public void LogOpenSetupGuide()
196197
{
197-
LogEvent(Constants.EventName.OPEN_SETUP_GUIDE);
198+
LogEvent(EventName.OPEN_SETUP_GUIDE);
198199
}
199200

200201
public void LogOpenIntegrationGuide()
201202
{
202-
LogEvent(Constants.EventName.OPEN_INTEGRATION_GUIDE);
203+
LogEvent(EventName.OPEN_INTEGRATION_GUIDE);
203204
}
204205

205206
public void LogLoadQuickStartScene()
206207
{
207-
LogEvent(Constants.EventName.LOAD_QUICK_START_SCENE);
208+
LogEvent(EventName.LOAD_QUICK_START_SCENE);
208209
}
209210

210211
public void LogOpenAvatarDocumentation()
211212
{
212-
LogEvent(Constants.EventName.OPEN_AVATAR_DOCUMENTATION);
213+
LogEvent(EventName.OPEN_AVATAR_DOCUMENTATION);
213214
}
214215

215216
public void LogOpenAnimationDocumentation()
216217
{
217-
LogEvent(Constants.EventName.OPEN_ANIMATION_DOCUMENTATION);
218+
LogEvent(EventName.OPEN_ANIMATION_DOCUMENTATION);
218219
}
219220

220221
public void LogOpenAvatarCreatorDocumentation()
221222
{
222-
LogEvent(Constants.EventName.OPEN_AVATAR_CREATOR_DOCUMENTATION);
223+
LogEvent(EventName.OPEN_AVATAR_CREATOR_DOCUMENTATION);
223224
}
224225

225226
public void LogOpenOptimizationDocumentation()
226227
{
227-
LogEvent(Constants.EventName.OPEN_OPTIMIZATION_DOCUMENTATION);
228+
LogEvent(EventName.OPEN_OPTIMIZATION_DOCUMENTATION);
228229
}
229230

230231
public void LogAvatarCreatorSampleImported()
231232
{
232-
LogEvent(Constants.EventName.AVATAR_CREATOR_SAMPLE_IMPORTED);
233+
LogEvent(EventName.AVATAR_CREATOR_SAMPLE_IMPORTED);
233234
}
234-
235+
236+
public void LogPackageInstalled(string id, string name)
237+
{
238+
LogEvent(EventName.INSTALL_PACKAGE, new Dictionary<string, object>
239+
{
240+
{ "id", id },
241+
{ "name", name },
242+
});
243+
}
244+
235245
private void SetUserProperties()
236246
{
237247
var userProperties = new Dictionary<string, object>
238248
{
239-
{ Constants.Properties.ENGINE_VERSION, appData.UnityVersion },
240-
{ Constants.Properties.RENDER_PIPELINE, appData.RenderPipeline },
241-
{ Constants.Properties.SUBDOMAIN, appData.PartnerName },
242-
{ Constants.Properties.APP_NAME, PlayerSettings.productName },
243-
{ Constants.Properties.SDK_TARGET, SDK_TARGET },
244-
{ Constants.Properties.APP_IDENTIFIER, Application.identifier },
245-
{ Constants.Properties.ALLOW_ANALYTICS, true }
249+
{ Properties.SDK_SOURCE_URL, PackageManagerHelper.GetSdkPackageSourceUrl() },
250+
{ Properties.ENGINE_VERSION, appData.UnityVersion },
251+
{ Properties.RENDER_PIPELINE, appData.RenderPipeline },
252+
{ Properties.SUBDOMAIN, appData.PartnerName },
253+
{ Properties.APP_NAME, PlayerSettings.productName },
254+
{ Properties.SDK_TARGET, SDK_TARGET },
255+
{ Properties.APP_IDENTIFIER, Application.identifier },
256+
{ Properties.ALLOW_ANALYTICS, true }
246257
};
247258

248259
Dictionary<string, string> modules = ModuleList.GetInstalledModuleVersionDictionary();
@@ -252,7 +263,7 @@ private void SetUserProperties()
252263
userProperties.Add(module.Key, module.Value);
253264
}
254265

255-
LogEvent(Constants.EventName.SET_USER_PROPERTIES, null, userProperties);
266+
LogEvent(EventName.SET_USER_PROPERTIES, null, userProperties);
256267
}
257268

258269
private void GenerateSessionId()
@@ -262,24 +273,25 @@ private void GenerateSessionId()
262273

263274
private void ToggleAnalytics(bool allow)
264275
{
265-
LogEvent(Constants.EventName.ALLOW_ANALYTICS, new Dictionary<string, object>
276+
LogEvent(EventName.ALLOW_ANALYTICS, new Dictionary<string, object>
266277
{
267-
{ Constants.Properties.ALLOW, allow }
278+
{ Properties.ALLOW, allow }
268279
}, new Dictionary<string, object>
269280
{
270-
{ Constants.Properties.ENGINE_VERSION, appData.UnityVersion },
271-
{ Constants.Properties.RENDER_PIPELINE, appData.RenderPipeline },
272-
{ Constants.Properties.SUBDOMAIN, appData.PartnerName },
273-
{ Constants.Properties.APP_NAME, PlayerSettings.productName },
274-
{ Constants.Properties.SDK_TARGET, "Unity" },
275-
{ Constants.Properties.APP_IDENTIFIER, Application.identifier },
276-
{ Constants.Properties.ALLOW_ANALYTICS, allow }
281+
{ Properties.ENGINE_VERSION, appData.UnityVersion },
282+
{ Properties.RENDER_PIPELINE, appData.RenderPipeline },
283+
{ Properties.SUBDOMAIN, appData.PartnerName },
284+
{ Properties.APP_NAME, PlayerSettings.productName },
285+
{ Properties.SDK_TARGET, "Unity" },
286+
{ Properties.APP_IDENTIFIER, Application.identifier },
287+
{ Properties.ALLOW_ANALYTICS, allow }
277288
});
278289
}
279-
290+
280291
private void LogEvent(string eventName, Dictionary<string, object> eventProperties = null, Dictionary<string, object> userProperties = null)
281292
{
282293
if (!isEnabled) return;
294+
283295
AmplitudeEventLogger.LogEvent(eventName, eventProperties, userProperties);
284296
}
285297
}

Editor/Analytics/Constants.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ public static class EventName
3232
public const string OPEN_AVATAR_CREATOR_DOCUMENTATION = "open avatar creator documentation";
3333
public const string OPEN_OPTIMIZATION_DOCUMENTATION = "open optimization documentation";
3434
public const string AVATAR_CREATOR_SAMPLE_IMPORTED = "Avatar creator sample imported";
35+
public const string INSTALL_PACKAGE = "install unity package";
3536
}
3637

3738
public static class Properties
3839
{
40+
public const string SDK_SOURCE_URL = "sdk source url";
3941
public const string ENGINE_VERSION = "engine version";
4042
public const string RENDER_PIPELINE = "render pipeline";
4143
public const string SUBDOMAIN = "subdomain";

Editor/Analytics/IAnalyticsEditorLogger.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using ReadyPlayerMe.Core.Editor;
2+
13
namespace ReadyPlayerMe.Core.Analytics
24
{
35
public interface IAnalyticsEditorLogger
@@ -31,5 +33,6 @@ public interface IAnalyticsEditorLogger
3133
void LogOpenAvatarCreatorDocumentation();
3234
void LogOpenOptimizationDocumentation();
3335
void LogAvatarCreatorSampleImported();
36+
void LogPackageInstalled(string id, string name);
3437
}
3538
}

Editor/Module Management/ModuleList.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static class ModuleList
1414
name = "com.readyplayerme.core",
1515
gitUrl = "https://github.com/readyplayerme/rpm-unity-sdk-core.git",
1616
branch = "",
17-
version = "4.0.1"
17+
version = "4.1.0"
1818
};
1919

2020
/// <summary>

0 commit comments

Comments
 (0)