Initial commit to support CI

This commit is contained in:
Jacopo Libè 2021-11-19 13:54:03 +01:00
parent 2c4160e6d9
commit d6991c9051
2 changed files with 51 additions and 13 deletions

38
.github/workflow/main.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Deploy NomaiVR
on: [push, pull_request]
jobs:
build:
name: Build unity project
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v2
with:
lfs: true
# Cache
- uses: actions/cache@v2
with:
path: Unity/Library
key: Library-${{ hashFiles('Unity/Assets/**', 'Unity/Packages/**', 'Unity/ProjectSettings/**') }}
restore-keys: |
Library-
# Build
- name: Build project
uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
projectPath: Unity
buildMethod: BuildCommands.PerformBuild
targetPlatform: Win64
# Output
- uses: actions/upload-artifact@v2
with:
name: Build
path: Unity/Build

View File

@ -95,19 +95,19 @@ namespace Valve.VR
private static void ShowDialog()
{
int shouldInstall = UnityEditor.EditorUtility.DisplayDialogComplex("SteamVR", "The SteamVR Unity Plugin can be used with the legacy Unity VR API (Unity 5.4 - 2019) or with the Unity XR API (2019+). Would you like to install in legacy VR mode or for Unity XR?", "Legacy VR", "Cancel", "Unity XR");
switch (shouldInstall)
{
case 0: //legacy vr
SteamVR_AutoEnableVR_UnityPackage.InstallAndEnableUnityVR();
break;
case 1: //cancel
break;
case 2: //unity xr
SteamVR_AutoEnableVR_UnityXR.InstallAndEnableUnityXR();
break;
}
SteamVR_AutoEnableVR_UnityPackage.InstallAndEnableUnityVR();
//int shouldInstall = UnityEditor.EditorUtility.DisplayDialogComplex("SteamVR", "The SteamVR Unity Plugin can be used with the legacy Unity VR API (Unity 5.4 - 2019) or with the Unity XR API (2019+). Would you like to install in legacy VR mode or for Unity XR?", "Legacy VR", "Cancel", "Unity XR");
//
//switch (shouldInstall)
//{
// case 0: //legacy vr
// break;
// case 1: //cancel
// break;
// case 2: //unity xr
// SteamVR_AutoEnableVR_UnityXR.InstallAndEnableUnityXR();
// break;
//}
End();
}