Skip to content

Commit

Permalink
Problem: Missing android support for play-unreal-demo (fix cronos-lab…
Browse files Browse the repository at this point in the history
…s/play-unreal-plugin#153) (#20)

* Problem: Missing android support for play-unreal-demo (fix cronos-labs/play-unreal-plugin#153)

Close:
- cronos-labs/play-unreal-plugin#153

Solutions:
- Move assets from play-unreal-plugin to play-unreal-demo
- Use play-unreal-plugin v0.0.7-alpha
- Add android configurations
- Update github action to release Asset Pack

* Remove key.keystore and update README
  • Loading branch information
damoncro authored Sep 21, 2022
1 parent 604e4f5 commit fc7e2cf
Show file tree
Hide file tree
Showing 16 changed files with 87 additions and 45 deletions.
35 changes: 23 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
paths-ignore:
- README.md
tags:
- "v*.*.*"
- "v*.*.*"
pull_request:
paths-ignore:
- README.md
Expand All @@ -22,29 +22,40 @@ jobs:
submodules: recursive

- name: Prepare Plugin
run: |
cd Plugins/play-unreal-plugin && make
working-directory: Plugins/play-unreal-plugin
run: make

- name: Package For Windows,Mac
- name: Package
run: |
FILENAME="CronosPlayDemo.zip"
cd ..
zip -r ${FILENAME} play-unreal-demo -x "play-unreal-demo/.git/*" "play-unreal-demo/.git/*" "play-unreal-demo/Plugins/play-unreal-plugin/.git/*" "play-unreal-demo/Plugins/play-unreal-plugin/.github/*" "play-unreal-demo/Plugins/play-unreal-plugin/install/*"
mv ${FILENAME} play-unreal-demo
cd play-unreal-demo
sha256sum ${FILENAME} > "checksums.txt"
echo "release_file=${FILENAME}" >> $GITHUB_ENV
echo "checksum_file=checksums.txt" >> $GITHUB_ENV
sha256sum ${FILENAME} > "checksums-${FILENAME}.txt"
echo "demo_file=${FILENAME}" >> $GITHUB_ENV
echo "demo_checksum_file=checksums-${FILENAME}.txt" >> $GITHUB_ENV
- name: Asset Pack
run: |
FILENAME="CronosPlayAssetPack.zip"
cd Content/CronosPlayUnreal/Blueprint
zip -r ${FILENAME} *
mv ${FILENAME} ../../..
cd ../../..
sha256sum ${FILENAME} > "checksums-${FILENAME}.txt"
echo "asset_pack_file=${FILENAME}" >> $GITHUB_ENV
echo "asset_pack_checksum_file=checksums-${FILENAME}.txt" >> $GITHUB_ENV
- name: Upload binaries and bindings to Release
uses: softprops/action-gh-release@v1
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
with:
draft: true
files: |
${{ env.release_file }}
${{ env.checksum_file }}
${{ env.demo_file }}
${{ env.demo_checksum_file }}
${{ env.asset_pack_file }}
${{ env.asset_pack_checksum_file }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 13 additions & 0 deletions Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,16 @@ AppliedDefaultGraphicsPerformance=Maximum
+ActiveClassRedirects=(OldClassName="TP_ThirdPersonGameMode",NewClassName="CronosPlayUnrealDemoGameMode")
+ActiveClassRedirects=(OldClassName="TP_ThirdPersonCharacter",NewClassName="CronosPlayUnrealDemoCharacter")

[/Script/AndroidRuntimeSettings.AndroidRuntimeSettings]
TargetSDKVersion=28
MinSDKVersion=21
bPackageDataInsideApk=True
bForceSmallOBBFiles=True
bEnableBundle=True
bBuildForArmV7=True
bBuildForArm64=True
KeyAlias=MyKey
KeyStore=key.keystore
KeyStorePassword=123456
KeyPassword=123456

5 changes: 4 additions & 1 deletion Config/DefaultGame.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@ ProjectID=D202058DFE4FDC1B82C89D96347EB60F
ProjectName=Third Person Game Template

[/Script/UnrealEd.ProjectPackagingSettings]
BuildConfiguration=PPBC_Development
BuildConfiguration=PPBC_Shipping
FullRebuild=True
ForDistribution=True
UsePakFile=True

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Content/ThirdPersonCPP/Maps/NFTErc1155.umap
Binary file not shown.
Binary file modified Content/ThirdPersonCPP/Maps/NFTErc721.umap
Binary file not shown.
Binary file modified Content/ThirdPersonCPP/Maps/WalletConnect.umap
Binary file not shown.
24 changes: 22 additions & 2 deletions CronosPlayUnrealDemo.uproject
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,25 @@
"CoreUObject"
]
}
]
}
],
"Plugins": [
{
"Name": "OculusVR",
"Enabled": false,
"SupportedTargetPlatforms": [
"Win32",
"Win64",
"Android"
]
},
{
"Name": "SteamVR",
"Enabled": false,
"SupportedTargetPlatforms": [
"Win32",
"Win64",
"Linux"
]
}
]
}
50 changes: 21 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,28 @@
This repository contains a sample project that uses the Cronos Play Unreal SDK plugin.
For more information, please see the [Cronos Play Unreal SDK plugin repository](https://github.com/crypto-com/play-unreal-plugin).


## Pre-requisites
Visual Studo 2019 or later (2022) or XCODE 13.2.1
Unreal Engine 4.27 and 5.0 are supported, i.e. one of them should be installed via the Epic Games Launcher.


## Installation Mac
1. in mac, just `make`
2. cd CronosPlayUnrealDemo
3. open `CronosPlayUnrealDeemo.project`
4. run

## Installation Windows
1. in windows, just `git submodule update --init --recursive`
2. cd CronosPlayUnrealDemo
3. run copydll.bat
4. open `CronosPlayUnrealDemo.project`
5. run

## To use dynamic libraries
if visual studio is used, add these lines to top of cpp source
```C++
#pragma warning(disable : 4583)
#pragma warning(disable : 4582)
```

## How to Run
1. cd CronosPlayUnrealDemo
2. click `CronosPlayUnrealDemo.project`
3. or run unreal engine 4.27 , and open project `CronosPlayUnrealDemo.uproject`
Windows: Visual Studo 2019 or later
Mac: XCODE 13.2.1
Android: NDK 21.4.7075529
Unreal Engine: 4.27 or 5.x

## Pre-built Release
Download the release zip file in [Release](https://github.com/cronos-labs/play-unreal-demo/releases) page.

### `CronosPlayDemo.zip`
- Assets: `./Content/CronosPlayUnreal/Blueprint`
- `CronosPlayUnreal` Plugin: `./Plugins/play-unreal-plugin`

### `CronosPlayAssetPack.zip`
- Assets: Blueprints, widgets etc

## Setup Manually
If you prefer configuring the project manually:
1. Clone this project
2. Under the project root and run `make` to setup `CronosPlayUnreal` plugin
3. open `CronosPlayUnrealDemo.uproject`
4. For android, you need to setup the key for signing, please check [here](https://docs.unrealengine.com/4.27/en-US/SharingAndReleasing/Mobile/Android/DistributionSigning/).

### More information for Cronos Play
If you are a game developer, please visit [Cronos Play](https://cronos.org/play) or fill this [Contact Form](https://airtable.com/shrFiQnLrcpeBp2lS) for more information.
3 changes: 3 additions & 0 deletions android_key_gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
/Applications/Android\ Studio.app/Contents/jre/Contents/Home/bin/keytool -genkey -v -keystore key.keystore -alias Mykey -keyalg RSA -keysize 2048 -validity 10000

0 comments on commit fc7e2cf

Please sign in to comment.