File tree Expand file tree Collapse file tree 9 files changed +92
-12
lines changed
Assets/WebGLTemplates/SequenceReact
WebGLTemplates/SequenceReact Expand file tree Collapse file tree 9 files changed +92
-12
lines changed Original file line number Diff line number Diff line change 1+ # Simple workflow for deploying static content to GitHub Pages
2+ name : Deploy static content to Pages
3+
4+ on :
5+ # Runs on pushes targeting the default branch
6+ push :
7+ branches : ["master"]
8+
9+ # Allows you to run this workflow manually from the Actions tab
10+ workflow_dispatch :
11+
12+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+ permissions :
14+ contents : read
15+ pages : write
16+ id-token : write
17+
18+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+ concurrency :
21+ group : " pages"
22+ cancel-in-progress : false
23+
24+ jobs :
25+ # Single deploy job since we're just deploying
26+ deploy :
27+ environment :
28+ name : github-pages
29+ url : ${{ steps.deployment.outputs.page_url }}
30+ runs-on : ubuntu-latest
31+ steps :
32+ - name : Checkout
33+ uses : actions/checkout@v4
34+ - name : Setup Pages
35+ uses : actions/configure-pages@v5
36+ - name : Setup Node.js
37+ uses : actions/setup-node@v3
38+ with :
39+ node-version : ' 18'
40+ - name : Install dependencies
41+ run : npm ci --prefix ./Demo/
42+ - name : Build the React app
43+ run : npm run build --prefix ./Demo/
44+ - name : Move Build Files
45+ run : ls ./Demo/ && mkdir ./Demo/dist/Build && cp -r ./Demo/Build/* ./Demo/dist/Build
46+ - name : Upload artifact
47+ uses : actions/upload-pages-artifact@v3
48+ with :
49+ # Upload entire repository
50+ path : ' ./Demo/dist/'
51+ - name : Deploy to GitHub Pages
52+ id : deployment
53+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1+ import { ReactUnityEventParameter } from "react-unity-webgl/distribution/types/react-unity-event-parameters" ;
12import { Unity , useUnityContext } from "react-unity-webgl" ;
23import { useCallback , useEffect , useState } from "react" ;
34import {
@@ -25,11 +26,14 @@ import "./App.css";
2526
2627 const loadingPercentage = Math . round ( loadingProgression * 100 ) ;
2728
28- const handleGoogleSignIn = useCallback ( ( googleClientId : string , nonce : string ) => {
29- setGoogleClientId ( googleClientId ) ;
30- setNonce ( nonce ) ;
31- setShowLogin ( true ) ;
32- } , [ ] ) ;
29+ const handleGoogleSignIn = useCallback ( ( ...parameters : ReactUnityEventParameter [ ] ) : ReactUnityEventParameter => {
30+ const googleClientId = parameters [ 0 ] as string ;
31+ const nonce = parameters [ 1 ] as string ;
32+ setGoogleClientId ( googleClientId ) ;
33+ setNonce ( nonce ) ;
34+ setShowLogin ( true ) ;
35+ return '' ;
36+ } , [ ] ) ;
3337
3438 const [ googleClientIdState , setGoogleClientId ] = useState ( "" ) ;
3539 const [ nonce , setNonce ] = useState ( "" ) ;
Original file line number Diff line number Diff line change @@ -4,4 +4,9 @@ import react from '@vitejs/plugin-react'
44// https://vitejs.dev/config/
55export default defineConfig ( {
66 plugins : [ react ( ) ] ,
7+ base : './' ,
8+ build : {
9+ assetsDir : '.' ,
10+ outDir : 'dist' ,
11+ } ,
712} )
Original file line number Diff line number Diff line change 1+ import { ReactUnityEventParameter } from "react-unity-webgl/distribution/types/react-unity-event-parameters" ;
12import { Unity , useUnityContext } from "react-unity-webgl" ;
23import { useCallback , useEffect , useState } from "react" ;
34import {
@@ -25,11 +26,14 @@ import "./App.css";
2526
2627 const loadingPercentage = Math . round ( loadingProgression * 100 ) ;
2728
28- const handleGoogleSignIn = useCallback ( ( googleClientId : string , nonce : string ) => {
29- setGoogleClientId ( googleClientId ) ;
30- setNonce ( nonce ) ;
31- setShowLogin ( true ) ;
32- } , [ ] ) ;
29+ const handleGoogleSignIn = useCallback ( ( ...parameters : ReactUnityEventParameter [ ] ) : ReactUnityEventParameter => {
30+ const googleClientId = parameters [ 0 ] as string ;
31+ const nonce = parameters [ 1 ] as string ;
32+ setGoogleClientId ( googleClientId ) ;
33+ setNonce ( nonce ) ;
34+ setShowLogin ( true ) ;
35+ return '' ;
36+ } , [ ] ) ;
3337
3438 const [ googleClientIdState , setGoogleClientId ] = useState ( "" ) ;
3539 const [ nonce , setNonce ] = useState ( "" ) ;
Original file line number Diff line number Diff line change @@ -4,4 +4,9 @@ import react from '@vitejs/plugin-react'
44// https://vitejs.dev/config/
55export default defineConfig ( {
66 plugins : [ react ( ) ] ,
7+ base : './' ,
8+ build : {
9+ assetsDir : '.' ,
10+ outDir : 'dist' ,
11+ } ,
712} )
Original file line number Diff line number Diff line change 1+ import { ReactUnityEventParameter } from "react-unity-webgl/distribution/types/react-unity-event-parameters" ;
12import { Unity , useUnityContext } from "react-unity-webgl" ;
23import { useCallback , useEffect , useState } from "react" ;
34import {
@@ -25,10 +26,13 @@ import "./App.css";
2526
2627 const loadingPercentage = Math . round ( loadingProgression * 100 ) ;
2728
28- const handleGoogleSignIn = useCallback ( ( googleClientId : string , nonce : string ) => {
29+ const handleGoogleSignIn = useCallback ( ( ...parameters : ReactUnityEventParameter [ ] ) : ReactUnityEventParameter => {
30+ const googleClientId = parameters [ 0 ] as string ;
31+ const nonce = parameters [ 1 ] as string ;
2932 setGoogleClientId ( googleClientId ) ;
3033 setNonce ( nonce ) ;
3134 setShowLogin ( true ) ;
35+ return '' ;
3236 } , [ ] ) ;
3337
3438 const [ googleClientIdState , setGoogleClientId ] = useState ( "" ) ;
Original file line number Diff line number Diff line change @@ -4,4 +4,9 @@ import react from '@vitejs/plugin-react'
44// https://vitejs.dev/config/
55export default defineConfig ( {
66 plugins : [ react ( ) ] ,
7+ base : './' ,
8+ build : {
9+ assetsDir : '.' ,
10+ outDir : 'dist' ,
11+ } ,
712} )
Original file line number Diff line number Diff line change 11{
22 "name" : " xyz.0xsequence.waas-unity" ,
3- "version" : " 3.17.2 " ,
3+ "version" : " 3.17.3 " ,
44 "displayName" : " Sequence Embedded Wallet SDK" ,
55 "description" : " A Unity SDK for the Sequence WaaS API" ,
66 "unity" : " 2021.3" ,
You can’t perform that action at this time.
0 commit comments