Skip to content

Commit

Permalink
[SDK-590] AppId mandatory in setup guide
Browse files Browse the repository at this point in the history
## [SDK-590](https://ready-player-me.atlassian.net/browse/)

## Description

-   Removed the demo subdomain checkbox from the setup guide
-   Preparations for the release 2.1.0
  • Loading branch information
gadamyan authored Nov 20, 2023
1 parent 5e2b7f7 commit cc5362c
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 26 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,44 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.1.0] 2023-11-20

## Breaking

- Moved ReadyPlayerMeSettings.EnableAvatarCaching project property to ReadyPlayerMeSettings.AvatarCacheSettings.EnableAvatarCaching.
- Removed Preload function from UReadyPlayerMeMemoryCache class. Use the PreloadAvatarsAsync sync node instead.
- Removed bUseMemoryCache property from the ReadyPlayerMeComponent
- Renamed ClearAvatar function to ClearAvatarFromCache
- Renamed GetCacheSize function to GetAvatarCacheSize
- Renamed GetAvatarCount function to GetCachedAvatarCount
- Renamed GetAvatarGuid function to GetAvatarId

## Added

- Added AvatarCacheSettings property in the project settings and moved the EnableAvatarCaching property inside of it.
- Added EnableAutomaticCacheCleaning and CachedAvatarLimit properties in AvatarCacheSettings. These properties enable the automatic cache management.
- Added PreloadAvatarsAsync sync node to make avatar preloading easy to use.
- Added ClearAvatarsFromMemory and ClearAvatarFromMemory functions. These functions clear preloaded avatars from the memory.
- Added bKeepLoadedAvatarsInMemory property in the project settings. This property allows to keep all the loaded avatars in the memory without preloading them.

## Updated

- Moved ReadyPlayerMeSettings.EnableAvatarCaching project property to ReadyPlayerMeSettings.AvatarCacheSettings.EnableAvatarCaching.
- Removed bUseMemoryCache property from the ReadyPlayerMeComponent
- Renamed ClearAvatar function to ClearAvatarFromCache
- Renamed GetCacheSize function to GetAvatarCacheSize
- Renamed GetAvatarCount function to GetCachedAvatarCount
- Renamed GetAvatarGuid function to GetAvatarId
- Set the PhysicsAssetOverride property in the BP_RPM_Character to fix the shadow issues in UE5
- UI fixes in AvatarCreator
- Changed the background material of the avatar editor

## Removed

- Removed bUseMemoryCache property from the ReadyPlayerMeComponent
- Removed Preload function from UReadyPlayerMeMemoryCache class. Use the PreloadAvatarsAsync sync node instead.
- Broken blueprints in the Data folders

## [2.0.0] 2023-11-01

## Breaking
Expand Down
Binary file modified Content/Editor/WBP_RPM_SetupGuide.uasset
Binary file not shown.
24 changes: 4 additions & 20 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
MIT License
The MIT License (MIT)
=====================

Copyright (c) 2022 Ready Player Me

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
This software is provided under the MIT License.
The integration and usage of functionalities within this software are governed by the Ready Player Me Developer Terms, available at https://studio.readyplayer.me/terms.
2 changes: 1 addition & 1 deletion ReadyPlayerMe.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "2.0.0",
"VersionName": "2.1.0",
"FriendlyName": "Ready Player Me",
"Description": "Ready Player Me SDK",
"Category": "Runtime",
Expand Down
2 changes: 2 additions & 0 deletions Source/ReadyPlayerMe/Private/ReadyPlayerMeAvatarLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include "ReadyPlayerMeGlbLoader.h"
#include "Request/AvatarRequest.h"
#include "Utils/MetadataExtractor.h"
#include "Engine/GameInstance.h"
#include "Engine/World.h"

//TODO: Move the timout to the RPMSettings to make it configurable
constexpr float AVATAR_REQUEST_TIMEOUT = 60.f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include "ReadyPlayerMeGameSubsystem.h"
#include "ReadyPlayerMeMemoryCache.h"
#include "Engine/GameInstance.h"
#include "Kismet/GameplayStatics.h"
#include "Storage/AvatarManifest.h"
#include "Storage/AvatarStorage.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ void UReadyPlayerMeGameSubsystem::Initialize(FSubsystemCollectionBase& Collectio

void UReadyPlayerMeGameSubsystem::Deinitialize()
{
MemoryCache->ClearAvatars();
MemoryCache = nullptr;
AvatarManifest.Reset();
}
3 changes: 2 additions & 1 deletion Source/ReadyPlayerMe/Private/ReadyPlayerMePreloadAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "ReadyPlayerMeGameSubsystem.h"
#include "ReadyPlayerMeMemoryCache.h"
#include "Kismet/GameplayStatics.h"
#include "Engine/GameInstance.h"
#include "Utils/AvatarUrlConvertor.h"

UReadyPlayerMePreloadAction* UReadyPlayerMePreloadAction::PreloadAvatarsAsync(UObject* WorldContextObject, const FAvatarPreloadData& PreloadData)
Expand All @@ -17,7 +18,7 @@ UReadyPlayerMePreloadAction* UReadyPlayerMePreloadAction::PreloadAvatarsAsync(UO

void UReadyPlayerMePreloadAction::Activate()
{
if (!IsValid(GetWorld()) || PreloadData.AvatarIds.Num() == 0 || !IsValid(PreloadData.TargetSkeleton))
if (GetWorld() == nullptr || PreloadData.AvatarIds.Num() == 0 || PreloadData.TargetSkeleton == nullptr)
{
OnFailed.Broadcast();
return;
Expand Down
2 changes: 1 addition & 1 deletion Source/ReadyPlayerMe/Private/Storage/AvatarManifest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void FAvatarManifest::Load()
const TArray<FString> SavedAvatars = FAvatarStorage::GetSavedAvatars();
for (const auto& AvatarId : SavedAvatars)
{
AvatarRecords[AvatarId] = FDateTime::Now().ToUnixTimestamp();
AvatarRecords.Add(AvatarId, FDateTime::Now().ToUnixTimestamp());
}
Save();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "AvatarManifestExtractor.h"

#include "ReadyPlayerMeTypes.h"
#include "Serialization/JsonSerializer.h"

static const FString JSON_AVATAR_RECORDS = "AvatarRecords";
static const FString JSON_ID = "id";
Expand Down
2 changes: 1 addition & 1 deletion Source/ReadyPlayerMe/Public/ReadyPlayerMeFunctionLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class READYPLAYERME_API UReadyPlayerMeFunctionLibrary : public UBlueprintFunctio
static void ClearAvatarFromCache(const UObject* WorldContextObject, const FString& AvatarId);

/** Is there any avatars present in the persistent cache. */
UFUNCTION(BlueprintCallable, Category = "Ready Player Me | Avatar Caching", meta = (DisplayName = "Is Avatar Cache Empty"))
UFUNCTION(BlueprintPure, Category = "Ready Player Me | Avatar Caching", meta = (DisplayName = "Is Avatar Cache Empty"))
static bool IsAvatarCacheEmpty();

/** Total Avatars stored in persistent cache. */
Expand Down
4 changes: 2 additions & 2 deletions Source/ReadyPlayerMe/Public/ReadyPlayerMeSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ struct READYPLAYERME_API FRpmAvatarCacheSettings
bool bEnableAvatarCaching = false;

UPROPERTY(EditAnywhere, Category = "Avatar Caching | Automated Cleanup", meta = (DisplayName = "Enable Automatic Avatar Cache Cleaning",
ToolTip = "If checked, the old avatars will be automatically removed if the number of the saved aavatars exceeds the cached avatar limit."))
ToolTip = "If checked, the old avatars will be automatically removed if the number of the saved avatars exceeds the cached avatar limit."))
bool bEnableAutomaticCacheCleaning = false;

UPROPERTY(EditAnywhere, Category = "Avatar Caching | Automated Cleanup", meta = (DisplayName = "Cached Avatar Limit",
ToolTip = "The limit of the cached avatars, when the limit is exceeded and the automatic cleaning is enabled the old avatars will automatically be cleaned."))
int32 CachedAvatarLimit = 50;
int32 CachedAvatarLimit = 30;
};

UCLASS(config=Game, defaultconfig, meta = (DisplayName="Ready Player Me"))
Expand Down

0 comments on commit cc5362c

Please sign in to comment.