Skip to content

Commit

Permalink
Merge branch 'release/v1.2.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
HarrisonHough committed Aug 14, 2023
2 parents b850044 + f0857ba commit e58ef36
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @HarrisonHough, @rYuuk and @srcnalt will be requested for
# @HarrisonHough and @rYuuk will be requested for
# review when someone opens a pull request.
* @HarrisonHough @rYuuk @srcnalt
* @HarrisonHough @rYuuk

5 changes: 2 additions & 3 deletions .github/latest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ This release adds support for handling account linking and asset unlock events c

## Changelog

## [1.2.0] - UNRELEASED
- added support for account linking for auto login [#14](https://github.com/readyplayerme/rpm-unity-sdk-webview/pull/14)
- added support for asset unlock events [#15](https://github.com/readyplayerme/rpm-unity-sdk-webview/pull/15)
- fix for missing prefab reference [#18](https://github.com/readyplayerme/rpm-unity-sdk-webview/pull/18)
- README.md updated with new guides [#18](https://github.com/readyplayerme/rpm-unity-sdk-webview/pull/18)
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [1.2.1] - 2023.08.14

### Fixed
- fix for missing prefab reference [#18](https://github.com/readyplayerme/rpm-unity-sdk-webview/pull/18)

### Updated
- README.md updated with new guides [#18](https://github.com/readyplayerme/rpm-unity-sdk-webview/pull/18)

## [1.2.0] - 2023.05.29
- added support for account linking for auto login [#14](https://github.com/readyplayerme/rpm-unity-sdk-webview/pull/14)
- added support for asset unlock events [#15](https://github.com/readyplayerme/rpm-unity-sdk-webview/pull/15)
Expand Down
68 changes: 68 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,71 @@ Please visit the online documentation and join our public `discord` community.

The WebView module is managed and installed automatically with the [Unity Core](https://github.com/readyplayerme/Unity-Core) module.
Please refer to the **[Quick Start guide]( https://github.com/readyplayerme/Unity-Core#readme )** for instructions on how to install the Unity Core module.


Users can create Ready Player Me avatars seamlessly in a WebView displayed within a Unity application.

## Prerequisites

**Ready Player Me Core:** You need the Unity Ready Player Me Core for Unity installed in your project to retrieve avatars. See the [Quickstart guide](https://docs.readyplayer.me/ready-player-me/integration-guides/unity/quickstart)
for instructions.

**Deploying the app.** In order to test your WebView app, you have to deploy it to a physical or virtual device. See the Unity documentation on how to do that.

## Project setup (Android and iOS)

Creating a Scene with a WebView in your Unity project is the same for Android and iOS.

1. Create or open your Unity project.
2. Import the Ready Player Me Core package into your project, if you haven't done so already.
3. Navigate to the Unity package manager by going to Window > Package Manager.
4. Find the Ready Player Me WebView package under Packages - Ready Player Me.
5. Find and import the WebView Sample by clicking the Import button.
6. Now open the WebView example scene by finding it in the Projects tab under `Samples/Ready Player Me WebView/\[VERSION_NUMBER\]/WebView`.
7. In the Hierarchy tab, you will find a WebView Canvas object with a child object called WebView Panel, select the WebViewPanel.
8. In the inspector you will find a WebViewPanel script with some adjustable settings.
- **Screen padding:** For adjusting the padding of the Panel UI.
- **Url Config:** By adjusting this you can control the behaviour of the RPM Avatar creator.
- **On Avatar Created:** This Event can be used to retrieve the avatar URL after finishing the avatar creation process.
9. Open the Build Settings to set up deployment for your chosen platform.
- don't forget to add the scene to the build settings.

_NOTE: The WebView example scene will not load an avatar into the unity scene, it will just return and display the avatar URL on the screen. To load an avatar in the screen you can create an avatar loader script make use of the OnAvatarCreated event on the WebViewPanel._

## Deploy on Android

1. In Build Settings, set the Platform to Android.
2. Check Development Build.
3. Click Player Settings....
4. Find `Player > Other Settings > Identification`.
- Check Override Default Package Name.
- Set a unique Package Name in the format com.YourCompanyName.YourProductName.
5. Find `Player > Other Settings > Under Configuration > Camera Usage Description` and put some descriptive text in this mandatory field.
6. Find `Player > Other Settings > Under Configuration > Microphone Usage Description` and put some descriptive text in this mandatory field.
7. Close the Project Settings.
8. On your device, turn on USB debugging in your Developer Options settings.
9. Connect your device to your computer.
10. Click Build and Run.
11. Once the app opens on your device, click the button. Give permissions, and off you go.

**_Alternatively, you can build the APK and deploy it on your own.
For release builds, see the Unity and Android documentation._**

## Troubleshooting
- If you don't have a subdomain, this warning will pop up, and you can click Continue with 'demo' subdomain.
- If your package name does not comply with the required format, you will get this warning and can't continue until you fix it.

## Deploy on iOS
1. In Build Settings, set the Platform to iOS.
2. Select Debug and check Development build.
3. Find `Player > Other Settings > Identification`.
- Check Override Default Package Name.
- Before you build your Project for iOS, make sure that you set the Bundle Identifier.
- Set a Package Name in the format `com.YourCompanyName.YourProductName`.
- Fill in the `Signing Team ID` (not required for Debug builds to complete).
- You can also choose whether your app targets the simulator or an actual device. To do this, change the SDK version** >> Target SDK to Simulate SDK or Device SDK.
4. Find `Player > Other Settings > Under Configuration > Camera Usage Description` and put some descriptive text in this mandatory field.
5. Find `Player > Other Settings > Under Configuration > Microphone Usage Description` and put some descriptive text in this mandatory field.
6. Close Project Settings.
7. Click Build.
8. In the file explorer, find your Builds folder and in it the `Unity-iPhone.xcodeproj`.
14 changes: 12 additions & 2 deletions Samples~/WebView/WebView.unity
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ MonoBehaviour:
urlConfig:
language: 0
clearCache: 0
quickStart: 0
gender: 0
bodyType: 0
OnAvatarCreated:
Expand Down Expand Up @@ -234,6 +235,15 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
OnUserSet:
m_PersistentCalls:
m_Calls: []
OnUserAuthorized:
m_PersistentCalls:
m_Calls: []
OnAssetUnlock:
m_PersistentCalls:
m_Calls: []
--- !u!1 &71238460
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1257,9 +1267,9 @@ MonoBehaviour:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 46671175}
m_TargetAssemblyTypeName:
m_TargetAssemblyTypeName: ReadyPlayerMe.WebView.WebViewPanel, ReadyPlayerMe.WebView
m_MethodName: LoadWebView
m_Mode: 1
m_Mode: 5
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.readyplayerme.webview",
"version": "1.2.0",
"version": "1.2.1",
"displayName": "Ready Player Me WebView",
"description": "Ready Player Me WebView helps you display an in-engine browser that helps you load RPM website where you can create avatars and receive avatar URL at the end of the process.\nWebView is mobile only and works in Android and IOS builds.",
"category": "tool",
Expand Down

0 comments on commit e58ef36

Please sign in to comment.