Skip to content

Commit

Permalink
Merge pull request #2 from Virtual-Therapeutics/steamvr_updates
Browse files Browse the repository at this point in the history
Steamvr updates
  • Loading branch information
BenHesson authored May 22, 2020
2 parents 71cfb14 + 89d3aa3 commit 4e88469
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 87 deletions.
31 changes: 17 additions & 14 deletions Assets/VRTK/Source/SDK/SteamVR/SDK_SteamVRInputSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
// DISCLAIMER: the code changes herein (for compatability with SteamVR Plugin 2.2.x) were created by a third party (WildStyle69) outside of VRTK, and are unsupported. VRTK takes no responsibility for the usage of this code, nor will provide any official support via GitHub or Slack.
namespace VRTK
{
#if VRTK_DEFINE_SDK_STEAMVR
using UnityEngine;
#if VRTK_DEFINE_SDK_STEAMVR
using Valve.VR;
#endif

/// <summary>
/// SDK SteamVR Input Source handles input commmunication with the SteamVR Input System.
Expand All @@ -14,7 +15,8 @@ namespace VRTK
/// </remarks>
public class SDK_SteamVRInputSource : MonoBehaviour
{
#region Variables
#if VRTK_DEFINE_SDK_STEAMVR
#region Variables

// Variables
// ----------
Expand Down Expand Up @@ -73,9 +75,9 @@ public class SDK_SteamVRInputSource : MonoBehaviour
private SDK_BaseController.ControllerType _currentControllerType = SDK_BaseController.ControllerType.Undefined;
//>

#endregion Variables
#endregion Variables

#region Unity Methods
#region Unity Methods

/// <summary>
/// On Enable
Expand Down Expand Up @@ -105,9 +107,9 @@ void Update ()
}
//-->

#endregion Unity Methods
#endregion Unity Methods

#region Properties
#region Properties

/// <summary>
/// Current Hand Type
Expand Down Expand Up @@ -140,9 +142,9 @@ public bool CurrentInputHasFingers {
}
//>

#endregion Properties
#endregion Properties

#region Input Methods
#region Input Methods

/// <summary>
/// Get Axis Delta
Expand Down Expand Up @@ -351,9 +353,9 @@ private bool IsButtonActionTouch(SDK_BaseController.ButtonPressTypes pressType)
}
//-->

#endregion Input Methods
#endregion Input Methods

#region Hair Trigger Methods
#region Hair Trigger Methods

/// <summary>
/// Update Hair Trigger
Expand Down Expand Up @@ -407,9 +409,9 @@ public bool GetHairTriggerUp()
}
//-->

#endregion Hair Trigger Methods
#endregion Hair Trigger Methods

#region Haptic Methods
#region Haptic Methods

/// <summary>
/// Trigger Haptic Pulse
Expand All @@ -423,7 +425,8 @@ public void TriggerHapticPulse(float amplitude = 1f, float duration = 1f, float
}
//-->

#endregion Haptic Methods
}
#endregion Haptic Methods
#endif
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"version": 1,
"overwriteOld": true,
"removeUnused": true,
"imported": false
"imported": true
}
32 changes: 32 additions & 0 deletions NugetInstallTools/init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ function Main() {
Move-DirContents $editorSourceDir $editorDestinationDir $packageName
Move-DirContents $foundationSourceDir $foundationDestinationDir $packageName
Move-DirContents $nativeSourceDir $runtimeDestinationDir $packageName

#SteamVR needs action input files moved to the root directory
Move-SteamVR-Files $runtimeDestinationDir $nugetParentDir

# TODO: check to see if any files are left behind and if so indicate that something's bad about the package?

Expand All @@ -127,6 +130,35 @@ function Main() {
log ""
}

function Move-SteamVR-Files($sourceDir, $parentDir) {

$items = @("actions.json",
"bindings_holographic_controller.json",
"bindings_knuckles.json",
"bindings_oculus_touch.json",
"bindings_vive_controller.json")

$folders = get-ChildItem $sourceDir -recurse | where {$_.name -like "com.vthera.vrtk*"} | select name

foreach ($folder in $folders.Name) {
$sourcePath = "$sourceDir\$folder\SteamVR_VRTK_Actions\1\"
if((Test-Path $sourcePath) -eq $False){
continue
}
$assetsFolder = (Split-Path -Path $parentDir)
$assetsParent = (Split-Path -Path $assetsFolder)

foreach ($item in $items) {
$itemPath = "$sourcePath\$item"
$destPath = "$assetsParent\$item"
if((Test-Path $destPath) -eq $False)
{
Copy-Item -Path $itemPath -Destination $assetsParent
}
}
}
}

function Count-PackageFiles() {
$filesToInit = 0
foreach ($dirEntry in Get-ChildItem (Join-Path $installPath $libFolder) -Recurse -Force -File -Exclude *.meta) {
Expand Down
111 changes: 41 additions & 70 deletions ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ PlayerSettings:
use32BitDisplayBuffer: 1
preserveFramebufferAlpha: 0
disableDepthAndStencilBuffers: 0
androidStartInFullscreen: 1
androidRenderOutsideSafeArea: 0
androidBlitType: 0
defaultIsNativeResolution: 1
macRetinaSupport: 1
Expand Down Expand Up @@ -96,9 +98,6 @@ PlayerSettings:
xboxEnableGuest: 0
xboxEnablePIXSampling: 0
metalFramebufferOnly: 0
n3dsDisableStereoscopicView: 0
n3dsEnableSharedListOpt: 1
n3dsEnableVSync: 0
xboxOneResolution: 0
xboxOneSResolution: 0
xboxOneXResolution: 3
Expand All @@ -107,11 +106,12 @@ PlayerSettings:
xboxOneDisableEsram: 0
xboxOnePresentImmediateThreshold: 0
switchQueueCommandMemory: 0
videoMemoryForVertexBuffers: 0
psp2PowerMode: 0
psp2AcquireBGM: 1
switchQueueControlMemory: 16384
switchQueueComputeMemory: 262144
switchNVNShaderPoolsGranularity: 33554432
switchNVNDefaultPoolsGranularity: 16777216
switchNVNOtherPoolsGranularity: 16777216
vulkanEnableSetSRGBWrite: 0
vulkanUseSWCommandBuffers: 0
m_SupportedAspectRatios:
4:3: 1
5:4: 1
Expand Down Expand Up @@ -145,6 +145,7 @@ PlayerSettings:
dashSupport: 0
enable360StereoCapture: 0
protectGraphicsMemory: 0
enableFrameTimingStats: 0
useHDRDisplay: 0
m_ColorGamuts: 00000000
targetPixelDensity: 30
Expand Down Expand Up @@ -175,7 +176,7 @@ PlayerSettings:
StripUnusedMeshComponents: 0
VertexChannelCompressionMask: 214
iPhoneSdkVersion: 988
iOSTargetOSVersionString: 8.0
iOSTargetOSVersionString: 9.0
tvOSSdkVersion: 0
tvOSRequireExtendedGameController: 0
tvOSTargetOSVersionString: 9.0
Expand Down Expand Up @@ -240,8 +241,8 @@ PlayerSettings:
tvOSManualSigningProvisioningProfileType: 0
appleEnableAutomaticSigning: 0
iOSRequireARKit: 0
iOSAutomaticallyDetectAndAddCapabilities: 1
appleEnableProMotion: 0
vulkanEditorSupport: 0
clonedFromGUID: 00000000000000000000000000000000
templatePackageId:
templateDefaultScene:
Expand Down Expand Up @@ -470,6 +471,7 @@ PlayerSettings:
switchAllowsRuntimeAddOnContentInstall: 0
switchDataLossConfirmation: 0
switchUserAccountLockEnabled: 0
switchSystemResourceMemory: 16777216
switchSupportedNpadStyles: 3
switchNativeFsCacheSize: 32
switchIsHoldTypeHorizontal: 0
Expand Down Expand Up @@ -530,6 +532,7 @@ PlayerSettings:
ps4pnGameCustomData: 1
playerPrefsSupport: 0
enableApplicationExit: 0
resetTempFolder: 1
restrictedAudioUsageRights: 0
ps4UseResolutionFallback: 0
ps4ReprojectionSupport: 0
Expand All @@ -553,53 +556,6 @@ PlayerSettings:
ps4attribEyeToEyeDistanceSettingVR: 0
ps4IncludedModules: []
monoEnv:
psp2Splashimage: {fileID: 0}
psp2NPTrophyPackPath:
psp2NPSupportGBMorGJP: 0
psp2NPAgeRating: 12
psp2NPTitleDatPath:
psp2NPCommsID:
psp2NPCommunicationsID:
psp2NPCommsPassphrase:
psp2NPCommsSig:
psp2ParamSfxPath:
psp2ManualPath:
psp2LiveAreaGatePath:
psp2LiveAreaBackroundPath:
psp2LiveAreaPath:
psp2LiveAreaTrialPath:
psp2PatchChangeInfoPath:
psp2PatchOriginalPackage:
psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui
psp2KeystoneFile:
psp2MemoryExpansionMode: 0
psp2DRMType: 0
psp2StorageType: 0
psp2MediaCapacity: 0
psp2DLCConfigPath:
psp2ThumbnailPath:
psp2BackgroundPath:
psp2SoundPath:
psp2TrophyCommId:
psp2TrophyPackagePath:
psp2PackagedResourcesPath:
psp2SaveDataQuota: 10240
psp2ParentalLevel: 1
psp2ShortTitle: Not Set
psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF
psp2Category: 0
psp2MasterVersion: 01.00
psp2AppVersion: 01.00
psp2TVBootMode: 0
psp2EnterButtonAssignment: 2
psp2TVDisableEmu: 0
psp2AllowTwitterDialog: 1
psp2Upgradable: 0
psp2HealthWarning: 0
psp2UseLibLocation: 0
psp2InfoBarOnStartup: 0
psp2InfoBarColor: 0
psp2ScriptOptimizationLevel: 2
splashScreenBackgroundSourceLandscape: {fileID: 0}
splashScreenBackgroundSourcePortrait: {fileID: 0}
spritePackerPolicy:
Expand All @@ -615,8 +571,9 @@ PlayerSettings:
webGLUseEmbeddedResources: 0
webGLCompressionFormat: 1
webGLLinkerTarget: 1
webGLThreadsSupport: 0
scriptingDefineSymbols:
1: VRTK_DEFINE_SDK_STEAMVR;VRTK_DEFINE_STEAMVR_PLUGIN_1_2_1_OR_NEWER;VRTK_DEFINE_STEAMVR_PLUGIN_2_0_1_OR_NEWER;VRTK_VERSION_3_3_0;VRTK_VERSION_3_3_0_OR_NEWER;VRTK_VERSION_3_1_0_OR_NEWER;VRTK_VERSION_3_2_0_OR_NEWER;VRTK_VERSION_3_2_1_OR_NEWER
1: VRTK_VERSION_3_3_0;VRTK_VERSION_3_3_0_OR_NEWER;VRTK_VERSION_3_1_0_OR_NEWER;VRTK_VERSION_3_2_0_OR_NEWER;VRTK_VERSION_3_2_1_OR_NEWER
4: VRTK_VERSION_3_3_0;VRTK_VERSION_3_3_0_OR_NEWER;VRTK_VERSION_3_1_0_OR_NEWER;VRTK_VERSION_3_2_0_OR_NEWER;VRTK_VERSION_3_2_1_OR_NEWER
7: VRTK_VERSION_3_3_0;VRTK_VERSION_3_3_0_OR_NEWER;VRTK_VERSION_3_1_0_OR_NEWER;VRTK_VERSION_3_2_0_OR_NEWER;VRTK_VERSION_3_2_1_OR_NEWER
13: VRTK_VERSION_3_3_0;VRTK_VERSION_3_3_0_OR_NEWER;VRTK_VERSION_3_1_0_OR_NEWER;VRTK_VERSION_3_2_0_OR_NEWER;VRTK_VERSION_3_2_1_OR_NEWER
Expand All @@ -628,6 +585,7 @@ PlayerSettings:
25: VRTK_VERSION_3_3_0;VRTK_VERSION_3_3_0_OR_NEWER;VRTK_VERSION_3_1_0_OR_NEWER;VRTK_VERSION_3_2_0_OR_NEWER;VRTK_VERSION_3_2_1_OR_NEWER
26: VRTK_VERSION_3_3_0;VRTK_VERSION_3_3_0_OR_NEWER;VRTK_VERSION_3_1_0_OR_NEWER;VRTK_VERSION_3_2_0_OR_NEWER;VRTK_VERSION_3_2_1_OR_NEWER
27: VRTK_VERSION_3_3_0;VRTK_VERSION_3_3_0_OR_NEWER;VRTK_VERSION_3_1_0_OR_NEWER;VRTK_VERSION_3_2_0_OR_NEWER;VRTK_VERSION_3_2_1_OR_NEWER
28: VRTK_VERSION_3_3_0;VRTK_VERSION_3_3_0_OR_NEWER;VRTK_VERSION_3_1_0_OR_NEWER;VRTK_VERSION_3_2_0_OR_NEWER;VRTK_VERSION_3_2_1_OR_NEWER
platformArchitecture:
iOS: 2
tvOS: 1
Expand All @@ -639,12 +597,13 @@ PlayerSettings:
iOS: 1
tvOS: 1
il2cppCompilerConfiguration: {}
managedStrippingLevel: {}
incrementalIl2cppBuild:
iOS: 1
tvOS: 0
allowUnsafeCode: 0
additionalIl2CppArgs:
scriptingRuntimeVersion: 0
scriptingRuntimeVersion: 1
apiCompatibilityLevelPerPlatform: {}
m_RenderingPath: 1
m_MobileRenderingPath: 1
Expand All @@ -662,28 +621,20 @@ PlayerSettings:
metroMediumTileShowName: 0
metroLargeTileShowName: 0
metroWideTileShowName: 0
metroSupportStreamingInstall: 0
metroLastRequiredScene: 0
metroDefaultTileSize: 1
metroTileForegroundText: 1
metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
metroSplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628,
a: 1}
metroSplashScreenUseBackgroundColor: 1
platformCapabilities: {}
metroTargetDeviceFamilies: {}
metroFTAName:
metroFTAFileTypes: []
metroProtocolName:
metroCompilationOverrides: 1
n3dsUseExtSaveData: 0
n3dsCompressStaticMem: 1
n3dsExtSaveDataNumber: 0x12345
n3dsStackSize: 131072
n3dsTargetPlatform: 2
n3dsRegion: 7
n3dsMediaSize: 0
n3dsLogoStyle: 3
n3dsTitle: GameName
n3dsProductCode:
n3dsApplicationId: 0xFF3FF
XboxOneProductId:
XboxOneUpdateKey:
XboxOneSandboxId:
Expand All @@ -709,6 +660,7 @@ PlayerSettings:
XboxOnePersistentLocalStorageSize: 0
XboxOneXTitleMemory: 8
xboxOneScriptCompiler: 0
XboxOneOverrideIdentityName:
vrEditorSettings:
daydream:
daydreamIconForeground: {fileID: 0}
Expand All @@ -723,11 +675,30 @@ PlayerSettings:
Purchasing: 0
UNet: 0
Unity_Ads: 0
luminIcon:
m_Name:
m_ModelFolderPath:
m_PortalFolderPath:
luminCert:
m_CertPath:
m_PrivateKeyPath:
luminIsChannelApp: 0
luminVersion:
m_VersionCode: 1
m_VersionName:
facebookSdkVersion: 7.9.1
apiCompatibilityLevel: 2
facebookAppId:
facebookCookies: 1
facebookLogging: 1
facebookStatus: 1
facebookXfbml: 0
facebookFrictionlessRequests: 1
apiCompatibilityLevel: 6
cloudProjectId:
framebufferDepthMemorylessMode: 0
projectName:
organizationId:
cloudEnabled: 0
enableNativePlatformBackendsForNewInputSystem: 0
disableOldInputManagerSupport: 0
legacyClampBlendShapeWeights: 1
Loading

0 comments on commit 4e88469

Please sign in to comment.