Skip to content

Commit

Permalink
Merge branch 'release/v5.0.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonHough committed Jan 17, 2024
2 parents 73c5462 + c5210b1 commit 7308806
Show file tree
Hide file tree
Showing 861 changed files with 46,044 additions and 191,538 deletions.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- Ready Player Me Core version
- Ready Player Me Avatar Loader version
- Ready Player Me WebView version
- glTFast version
- Unity Editor version [e.g. 2021.2.1f1]
Expand Down
36 changes: 33 additions & 3 deletions .github/latest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,38 @@
## Changelog

### Updated
- replaced API URLs with model URLs for shortcodes by @rk132 in [#152](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/152)
- updated render api and samples @rYuuk in [#147](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/147)
- refactor and extracted shared logic from network packages @harrisonhough in [#148](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/148)
- replaced api urls in samples with models urls by @rk132 in [#152](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/152)
- added com.unity.cloud.gltfast as a dependency and removed auto install of gltfast from git url by @harrisonhough in [#155](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/155)
- updated to GLTFast 6.0.1 by @harrisonhough in by @harrisonhough in [#157](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/157)
- replaced use of ienumerator coroutines with async/await by @rYuuk in [#172](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/172)
- request class names updated to be more uniform by @MaxAndreassenRPM in [#173](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/173)
- endpoint classes removed and refactored by @MaxAndreassenRPM in [#174](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/174)
- added avatar creator POC sample using new elements by @ryuuk in [#182](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/182)
- removed "I don't have an account" checkbox from setup guide by @rk132 in [#184](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/184)
- restructure of avatar creator samples by @rYuuk in [#185](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/185)
- class and folder restructure to match Unity package standards by @harrisonhough in [#190](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/190)
- namespaces added to some scripts to meet asset store requirements by @harrisonhough in [#195](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/195)
- Ready Player Me top toolbar menu is under `Tools/Ready Player Me` to comply with Asset Store requirements by @harrisonhough in [#195](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/195)
- samples renamed for Asset Store version of package and paths updated accordingly by @harrisonhough in [#198](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/198)
- quick start sample animations updated by @rYuuk in [#200](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/200)
- draco compression package version updated by @harrisonhough in [#202](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/202)

### Added
- Added app id to setup guide by @ryuuk in [#145](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/145)
- add gender select element for Avatar Creator by @harrisonhough in [#159](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/159)
- basic login element for Avatar Creator by @harrisonhough in [#160](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/160)
- photo capture element for Avatar Creator by @ryuuk in [#162](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/162)
- avatar template element for Avatar Creator by @harrisonhough in [#164](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/164)
- selfie element for Avatar Creator by @ryuuk in [#166](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/166)
- asset panel element for Avatar Creator by @harrisonhough in [#175](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/175)
- account creation element for Avatar Creator by @ryuuk in [#178](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/178)
- avatar preview element for Avatar Creator by @ryuuk in [#181](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/181)

- fixed some issues related to paths like in the Graphics Setting Utility by @harrisonhough in [#195](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/195)
- shader override property added to avatar config by @ryuuk in [#199](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/199)

### Fixed
- fix for handling pasted url text in subdomain field by @harrisonhough in [#183](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/183)
- added permission and orientation fix to photo capture element by @ryuuk in [#192](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/192)
- added Panel Switcher clear functionality to fix issues related to relaunching the creator by @ryuuk in [#194](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/194)
- namespaces added to some scripts to meet asset store requirements by @harrisonhough in [#195](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/195)
2 changes: 1 addition & 1 deletion .github/workflows/pr-test-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run Tests

on:
pull_request:
types: [ opened, reopened ]
types: [ opened, reopened, edited ]
workflow_dispatch:

jobs:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ sysinfo.txt

# Builds
*.apk
*.unitypackage

# Crashlytics generated file
crashlytics-build.properties
Expand Down
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,45 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [5.0.0] - 2024.01.12

### Updated
- refactor and extracted shared logic from network packages @harrisonhough in [#148](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/148)
- replaced api urls in samples with models urls by @rk132 in [#152](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/152)
- added com.unity.cloud.gltfast as a dependency and removed auto install of gltfast from git url by @harrisonhough in [#155](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/155)
- updated to GLTFast 6.0.1 by @harrisonhough in by @harrisonhough in [#157](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/157)
- replaced use of ienumerator coroutines with async/await by @rYuuk in [#172](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/172)
- request class names updated to be more uniform by @MaxAndreassenRPM in [#173](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/173)
- endpoint classes removed and refactored by @MaxAndreassenRPM in [#174](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/174)
- added avatar creator POC sample using new elements by @ryuuk in [#182](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/182)
- removed "I don't have an account" checkbox from setup guide by @rk132 in [#184](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/184)
- restructure of avatar creator samples by @rYuuk in [#185](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/185)
- class and folder restructure to match Unity package standards by @harrisonhough in [#190](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/190)
- namespaces added to some scripts to meet asset store requirements by @harrisonhough in [#195](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/195)
- Ready Player Me top toolbar menu is under `Tools/Ready Player Me` to comply with Asset Store requirements by @harrisonhough in [#195](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/195)
- samples renamed for Asset Store version of package and paths updated accordingly by @harrisonhough in [#198](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/198)
- quick start sample animations updated by @rYuuk in [#200](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/200)
- draco compression package version updated by @harrisonhough in [#202](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/202)

### Added
- add gender select element for Avatar Creator by @harrisonhough in [#159](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/159)
- basic login element for Avatar Creator by @harrisonhough in [#160](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/160)
- photo capture element for Avatar Creator by @ryuuk in [#162](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/162)
- avatar template element for Avatar Creator by @harrisonhough in [#164](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/164)
- selfie element for Avatar Creator by @ryuuk in [#166](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/166)
- asset panel element for Avatar Creator by @harrisonhough in [#175](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/175)
- account creation element for Avatar Creator by @ryuuk in [#178](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/178)
- avatar preview element for Avatar Creator by @ryuuk in [#181](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/181)

- fixed some issues related to paths like in the Graphics Setting Utility by @harrisonhough in [#195](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/195)
- shader override property added to avatar config by @ryuuk in [#199](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/199)

### Fixed
- fix for handling pasted url text in subdomain field by @harrisonhough in [#183](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/183)
- added permission and orientation fix to photo capture element by @ryuuk in [#192](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/192)
- added Panel Switcher clear functionality to fix issues related to relaunching the creator by @ryuuk in [#194](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/194)
- namespaces added to some scripts to meet asset store requirements by @harrisonhough in [#195](https://github.com/readyplayerme/rpm-unity-sdk-core/pull/195)

## [4.1.2] - 2023.12.20

### Fixed
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions Editor/AvatarCreator/AssetTypeFilterDrawer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

namespace ReadyPlayerMe.AvatarCreator.Editor
{
[CustomPropertyDrawer(typeof(AssetTypeFilterAttribute))]
public class AssetTypeFilterDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
var assetTypeAttribute = attribute as AssetTypeFilterAttribute;

if (property.propertyType == SerializedPropertyType.Enum)
{
EditorGUI.BeginProperty(position, label, property);

EditorGUI.BeginChangeCheck();

// Get the current enum value
var currentEnumValue = (AssetType) property.enumValueIndex;

var filteredEnumNames = new List<string>();
foreach (var enumName in Enum.GetNames(typeof(AssetType)))
{
var enumFieldInfo = typeof(AssetType).GetField(enumName);
var enumAttribute = (AssetTypeFilterAttribute) Attribute.GetCustomAttribute(enumFieldInfo, typeof(AssetTypeFilterAttribute));
if (enumAttribute == null) continue;

var filter = (AssetFilter) Enum.Parse(typeof(AssetFilter), enumAttribute.filter.ToString());
if (filter == assetTypeAttribute?.filter)
{
filteredEnumNames.Add(enumName);
}
}

// Display the dropdown with filtered enum values
var newIndex = EditorGUI.Popup(position, label.text, Array.IndexOf(filteredEnumNames.ToArray(), currentEnumValue.ToString()), filteredEnumNames.ToArray());

// Set the new enum value if it has changed
if (EditorGUI.EndChangeCheck())
{
property.enumValueIndex = (int) Enum.Parse(typeof(AssetType), filteredEnumNames[newIndex]);
}

EditorGUI.EndProperty();
}
else
{
EditorGUI.LabelField(position, label.text, "Use AssetType with Enum.");
}
}

}
}
3 changes: 3 additions & 0 deletions Editor/AvatarCreator/AssetTypeFilterDrawer.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "ReadyPlayerMe.Core.AvatarCreatorSample.Editor",
"name": "ReadyPlayerMe.AvatarCreator.Editor",
"rootNamespace": "",
"references": [
"ReadyPlayerMe.Core.AvatarCreator",
"ReadyPlayerMe.Core",
"ReadyPlayerMe.Core.AvatarCreatorSample"
"ReadyPlayerMe.AvatarCreator"
],
"includePlatforms": [
"Editor"
Expand All @@ -17,4 +16,4 @@
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes
File renamed without changes.
Binary file added Editor/Core/Resources/rpm_error_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Runtime/Extras.meta → Editor/Core/Scripts.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions Editor/Core/Scripts/Extensions.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Editor/Core/Scripts/Extensions/StringExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.Text.RegularExpressions;

namespace ReadyPlayerMe.Core.Editor
{
public static class StringExtensions
{
private const string SHORT_CODE_REGEX = "^[A-Z0-9]{6}$";

public static bool IsUrlShortcodeValid(this string urlString)
{
return !string.IsNullOrEmpty(urlString) &&
(Regex.Match(urlString, SHORT_CODE_REGEX).Length > 0 || Uri.IsWellFormedUriString(urlString, UriKind.Absolute) && urlString.EndsWith(".glb"));
}
}
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ private static void Update()
AnalyticsEditorLogger.EventLogger.LogOpenProject();
AnalyticsEditorLogger.EventLogger.IdentifyUser();
Startup?.Invoke();
EditorApplication.quitting += OnQuit;
}

private static void OnQuit()
{
AnalyticsEditorLogger.EventLogger.LogCloseProject();
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ public static class ModuleInstaller

private const int THREAD_SLEEP_TIME = 100;
private const string PROGRESS_BAR_TITLE = "Ready Player Me";
private const string GLTFAST_NAME = "com.atteneder.gltfast";
private const string WEBVIEW_NAME = "webview";

private const string MODULE_INSTALLATION_SUCCESS_MESSAGE =
"All the modules are installed successfully. Ready Player Me avatar system is ready to use.";
Expand All @@ -33,30 +31,18 @@ public static class ModuleInstaller

private const float TIMEOUT_FOR_MODULE_INSTALLATION = 20f;

private static bool modulesInstalled;

static ModuleInstaller()
{
Events.registeringPackages -= OnRegisteringPackages;
Events.registeringPackages += OnRegisteringPackages;
# if RPM_DEVELOPMENT
modulesInstalled = true;
#endif
if (!modulesInstalled)
{
InstallModules();
EditorApplication.delayCall += DelayCreateCoreSettings;
}

#if !GLTFAST
if (IsModuleInstalled(GLTFAST_NAME))
{
DefineSymbolHelper.AddSymbols();
}
#endif

#if !READY_PLAYER_ME
InstallModules();
EditorApplication.delayCall += DelayCreateCoreSettings;
DefineSymbolHelper.AddSymbols();
#endif
}

/// <summary>
/// Called when a package is about to be added, removed or changed.
/// </summary>
Expand All @@ -75,6 +61,7 @@ private static void DelayCreateCoreSettings()
{
EditorApplication.delayCall -= DelayCreateCoreSettings;
CoreSettingsLoader.EnsureSettingsExist();

}

/// <summary>
Expand All @@ -85,8 +72,7 @@ private static void InstallModules()
EditorUtility.DisplayProgressBar(PROGRESS_BAR_TITLE, INSTALLING_MODULES, 0);
Thread.Sleep(THREAD_SLEEP_TIME);

ModuleInfo[] missingModules = GetMissingModuleNames();

var missingModules = GetMissingModuleNames();
if (missingModules.Length > 0)
{
var installedModuleCount = 0f;
Expand All @@ -102,7 +88,6 @@ private static void InstallModules()
Thread.Sleep(THREAD_SLEEP_TIME);
}
EditorUtility.ClearProgressBar();
modulesInstalled = true;
}

/// <summary>
Expand Down Expand Up @@ -134,11 +119,6 @@ private static ModuleInfo[] GetMissingModuleNames()
{
PackageInfo[] installed = GetPackageList();
var missingModules = ModuleList.Modules.Where(m => installed.All(i => m.name != i.name)).ToList();

if(!missingModules.Any(module => module.name.Contains(GLTFAST_NAME)))
{
missingModules = missingModules.Where(module => !module.name.Contains(WEBVIEW_NAME)).ToList();
}
return missingModules.ToArray();
}

Expand Down
Loading

0 comments on commit 7308806

Please sign in to comment.