-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/v7.0.0' into main
- Loading branch information
Showing
102 changed files
with
9,896 additions
and
91,842 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
|
||
## Changelog | ||
|
||
### Updated | ||
## Updated | ||
|
||
- XR animation avatars now have DOF enabled by default [#288](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/288) | ||
- Updated InCreatorAvatarLoader to use avatar config [#286](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/286) | ||
- Avatar Creator Icon categories updated [#272](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/272) | ||
- loading circle animation now using MMecanim animation [#302](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/302) | ||
- removed unnecessary assets from Resources folder [#303](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/303) | ||
- updated Template avatar assets [#300](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/300) | ||
- Avatar Body type now moved to CoreSettings [#290](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/290) | ||
|
||
### Fixed | ||
### Added | ||
|
||
- Fixed an issue preventing LOD's from updating [#277](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/277) | ||
- An issue causing multiple signup requests [#275](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/275) | ||
- Added support for hero customization assets (costumes) [#301](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/301) | ||
- templates can now be filtered by Bodytype [#296](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/296) | ||
|
||
### Added | ||
- Avatar template type filter [#270](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/270) | ||
- Handle failed body shape requests [#281](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/281) | ||
- Option to filter Templates by gender [#273](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/273) | ||
### Fixed | ||
|
||
- fixed an issue causing invalid load settings in Avatar Loader window [#298](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/298) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ public enum HelpSubject | |
Subdomain, | ||
AvatarConfig, | ||
GltfDeferAgent, | ||
LoadingAvatars | ||
LoadingAvatars, | ||
Avatars | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
Editor/Core/Scripts/UI/EditorWindows/Templates/AvatarBodyTypeTemplate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
using System.Linq; | ||
using JetBrains.Annotations; | ||
using ReadyPlayerMe.Core.Analytics; | ||
using UnityEditor.UIElements; | ||
using UnityEngine; | ||
using UnityEngine.UIElements; | ||
using Object = UnityEngine.Object; | ||
|
||
namespace ReadyPlayerMe.Core.Editor | ||
{ | ||
public class AvatarBodyTypeTemplate : VisualElement | ||
{ | ||
private const string XML_PATH = "AvatarBodyTypeTemplate"; | ||
[CanBeNull] private const string AVATAR_BODY_TYPE_DROPDOWN_FIELD = "DropdownField"; | ||
private const string AVATAR_BODY_TYPE_HELP_BUTTON = "BodyTypeHelpButton"; | ||
|
||
public new class UxmlFactory : UxmlFactory<AvatarBodyTypeTemplate, UxmlTraits> | ||
{ | ||
} | ||
public new class UxmlTraits : VisualElement.UxmlTraits | ||
{ | ||
} | ||
|
||
public AvatarBodyTypeTemplate() | ||
{ | ||
var visualTree = Resources.Load<VisualTreeAsset>(XML_PATH); | ||
visualTree.CloneTree(this); | ||
|
||
var bodyType = CoreSettingsHandler.CoreSettings.BodyType; | ||
|
||
var field = this.Q<DropdownField>(AVATAR_BODY_TYPE_DROPDOWN_FIELD); | ||
field.choices = Enum.GetNames(typeof(BodyType)).AsEnumerable().Where(bodyType => bodyType != BodyType.None.ToString()).ToList(); | ||
field.value = bodyType.ToString(); | ||
field.RegisterValueChangedCallback(OnBodyTypeChanged); | ||
this.Q<Button>(AVATAR_BODY_TYPE_HELP_BUTTON).clicked += OnHelpButtonClicked; | ||
} | ||
|
||
private void OnHelpButtonClicked() | ||
{ | ||
AnalyticsEditorLogger.EventLogger.LogFindOutMore(HelpSubject.Avatars); | ||
Application.OpenURL(Constants.Links.AVATARS); | ||
} | ||
|
||
private void OnBodyTypeChanged(ChangeEvent<string> evt) | ||
{ | ||
var newBodyType = Enum.Parse<BodyType>(evt.newValue); | ||
CoreSettingsSetter.SaveBodyType(newBodyType); | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Editor/Core/Scripts/UI/EditorWindows/Templates/AvatarBodyTypeTemplate.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
Editor/Core/Scripts/UI/EditorWindows/Templates/Resources/AvatarBodyTypeTemplate.uxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" xsi="http://www.w3.org/2001/XMLSchema-instance" engine="UnityEngine.UIElements" editor="UnityEditor.UIElements" noNamespaceSchemaLocation="../../../../../../../../UIElementsSchema/UIElements.xsd" editor-extension-mode="True"> | ||
<ui:VisualElement name="Container" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); flex-direction: row; align-items: center; justify-content: flex-start; align-self: flex-start; margin-left: 15px; margin-right: 15px; flex-shrink: 1;"> | ||
<ui:VisualElement name="LabelAndHelpButton" style="flex-grow: 0; background-color: rgba(0, 0, 0, 0); flex-direction: row; align-items: center; justify-content: flex-start; align-self: center; min-width: 145px;"> | ||
<ui:Label tabindex="-1" text="Avatar Body Type" display-tooltip-when-elided="true" enable-rich-text="true" name="BodyTypeLabel" style="height: 33px; -unity-text-align: middle-left;" /> | ||
<ui:Button text="?" display-tooltip-when-elided="true" name="BodyTypeHelpButton" class="button2" style="margin-left: 0; margin-right: 0; margin-top: 0; margin-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; padding-bottom: 0; width: 20px; height: 20px; border-top-left-radius: 15px; border-bottom-left-radius: 15px; border-top-right-radius: 15px; border-bottom-right-radius: 15px; -unity-text-align: middle-center; white-space: nowrap;" /> | ||
</ui:VisualElement> | ||
<ui:DropdownField index="-1" name="DropdownField" style="width: 318px; max-width: initial; min-width: initial; margin-left: 0;" /> | ||
</ui:VisualElement> | ||
</ui:UXML> |
10 changes: 10 additions & 0 deletions
10
Editor/Core/Scripts/UI/EditorWindows/Templates/Resources/AvatarBodyTypeTemplate.uxml.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
Runtime/AvatarCreator/Scripts/Extensions/TaskExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
|
||
namespace ReadyPlayerMe.AvatarCreator | ||
{ | ||
public static class TaskExtensions | ||
{ | ||
public const string ON_REQUEST_CANCELLED_MESSAGE = "Request was cancelled"; | ||
private const string ON_OPERATION_CANCELLED_MESSAGE = "Operation was cancelled"; | ||
public static async Task HandleCancellation(Task taskToWait, Action onSuccess = null) | ||
{ | ||
try | ||
{ | ||
await taskToWait; | ||
onSuccess?.Invoke(); | ||
} | ||
catch (Exception ex) | ||
{ | ||
if (ex.Message != ON_REQUEST_CANCELLED_MESSAGE && ex.Message != ON_OPERATION_CANCELLED_MESSAGE) | ||
{ | ||
throw; | ||
} | ||
} | ||
} | ||
|
||
public static async Task<T> HandleCancellation<T>(Task<T> taskToWait) | ||
{ | ||
try | ||
{ | ||
return await taskToWait; | ||
} | ||
catch (Exception ex) | ||
{ | ||
if (ex.Message != ON_REQUEST_CANCELLED_MESSAGE && ex.Message != ON_OPERATION_CANCELLED_MESSAGE) | ||
{ | ||
throw; | ||
} | ||
} | ||
return default; | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
Runtime/AvatarCreator/Scripts/Extensions/TaskExtensions.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.