-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 1.3b06 Update to new SteamVR Input System, Knuckles, velocities
Changes for v1.3b06: * Added some flower and planting stuff for the tutorial * Updating knuckles actions and binding jsons * Added code solution for blending skeleton animations to mechanim, no example yet though * Updated some helper components to utilize Unity Events properly * Updated skeleton hierarchy Changes for v1.3b05: * Added a knuckles binding for the Grab mode * Fixed some bugs around skeleton updates and GC alloc * Fixed a pretty significant perf hit * Added a blending option to skeletons * Added some ui to try out skeleton options * Added a target for the throwing examples * Updated longbow to only fire arrows with the pinch action * Updated other interactable examples * Added some helper methods to hand around showing / hiding controller or the whole hand. * Fixed some of the throwing examples Changes for v1.3b04: * Added some more extensive velocity and angular velocity estimation based on positions and rotations per frame. Normalizing for time between frames. * Cleaned out and updated the actions + bindings for knuckles/wands/touch. * Fixed a bug with newly created actions not having a set type * Updated extra scenes to use the new input system Changes for v1.3b03: * Fixed some warnings for unity 2017 / 2018. * Fixed some editor UI issues for 2018 * Fixed issues with Unity 2017+ not wanting to open scenes from a script reloaded callback Changes for v1.3b02: * Added DefaultInputAction attribute to automatically assign actions during action generation. * Updated default CameraRig prefab to use the new input system and components Changes for v1.3b01: * Integrated SteamVR Input System. https://steamcommunity.com/games/250820/announcements/detail/3809361199426010680 * [InteractionSystem] Added basic examples of the Skeletal API * [InteractionSystem] Integrated SteamVR Input System. Actions and Action Sets instead of buttons. * [InteractionSystem] Added Velocity style object interaction * [InteractionSystem] Fixed some issues from github. Took some pull requests. #79 #73 #72 #71 #67 #64 #84 #78
- Loading branch information
Showing
826 changed files
with
165,324 additions
and
88,693 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,127 +1,127 @@ | ||
//======= Copyright (c) Valve Corporation, All rights reserved. =============== | ||
// | ||
// Purpose: Custom inspector display for SteamVR_Camera | ||
// | ||
//============================================================================= | ||
|
||
using UnityEngine; | ||
using UnityEditor; | ||
using System.IO; | ||
|
||
[CustomEditor(typeof(SteamVR_Camera)), CanEditMultipleObjects] | ||
public class SteamVR_Editor : Editor | ||
{ | ||
int bannerHeight = 150; | ||
Texture logo; | ||
|
||
SerializedProperty script, wireframe; | ||
|
||
string GetResourcePath() | ||
{ | ||
var ms = MonoScript.FromScriptableObject(this); | ||
var path = AssetDatabase.GetAssetPath(ms); | ||
path = Path.GetDirectoryName(path); | ||
return path.Substring(0, path.Length - "Editor".Length) + "Textures/"; | ||
} | ||
|
||
void OnEnable() | ||
{ | ||
var resourcePath = GetResourcePath(); | ||
|
||
logo = AssetDatabase.LoadAssetAtPath<Texture2D>(resourcePath + "logo.png"); | ||
|
||
script = serializedObject.FindProperty("m_Script"); | ||
|
||
wireframe = serializedObject.FindProperty("wireframe"); | ||
|
||
foreach (SteamVR_Camera target in targets) | ||
target.ForceLast(); | ||
} | ||
|
||
public override void OnInspectorGUI() | ||
{ | ||
serializedObject.Update(); | ||
|
||
var rect = GUILayoutUtility.GetRect(Screen.width - 38, bannerHeight, GUI.skin.box); | ||
if (logo) | ||
GUI.DrawTexture(rect, logo, ScaleMode.ScaleToFit); | ||
|
||
if (!Application.isPlaying) | ||
{ | ||
var expand = false; | ||
var collapse = false; | ||
foreach (SteamVR_Camera target in targets) | ||
{ | ||
if (AssetDatabase.Contains(target)) | ||
continue; | ||
if (target.isExpanded) | ||
collapse = true; | ||
else | ||
expand = true; | ||
} | ||
|
||
if (expand) | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
if (GUILayout.Button("Expand")) | ||
{ | ||
foreach (SteamVR_Camera target in targets) | ||
{ | ||
if (AssetDatabase.Contains(target)) | ||
continue; | ||
if (!target.isExpanded) | ||
{ | ||
target.Expand(); | ||
EditorUtility.SetDirty(target); | ||
} | ||
} | ||
} | ||
GUILayout.Space(18); | ||
GUILayout.EndHorizontal(); | ||
} | ||
|
||
if (collapse) | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
if (GUILayout.Button("Collapse")) | ||
{ | ||
foreach (SteamVR_Camera target in targets) | ||
{ | ||
if (AssetDatabase.Contains(target)) | ||
continue; | ||
if (target.isExpanded) | ||
{ | ||
target.Collapse(); | ||
EditorUtility.SetDirty(target); | ||
} | ||
} | ||
} | ||
GUILayout.Space(18); | ||
GUILayout.EndHorizontal(); | ||
} | ||
} | ||
|
||
EditorGUILayout.PropertyField(script); | ||
EditorGUILayout.PropertyField(wireframe); | ||
|
||
serializedObject.ApplyModifiedProperties(); | ||
} | ||
|
||
public static void ExportPackage() | ||
{ | ||
AssetDatabase.ExportPackage(new string[] { | ||
"Assets/SteamVR", | ||
"Assets/Plugins/openvr_api.cs", | ||
"Assets/Plugins/openvr_api.bundle", | ||
"Assets/Plugins/x86/openvr_api.dll", | ||
"Assets/Plugins/x86/steam_api.dll", | ||
"Assets/Plugins/x86/libsteam_api.so", | ||
"Assets/Plugins/x86_64/openvr_api.dll", | ||
"Assets/Plugins/x86_64/steam_api.dll", | ||
"Assets/Plugins/x86_64/libsteam_api.so", | ||
"Assets/Plugins/x86_64/libopenvr_api.so", | ||
}, "steamvr.unitypackage", ExportPackageOptions.Recurse); | ||
EditorApplication.Exit(0); | ||
} | ||
} | ||
|
||
//======= Copyright (c) Valve Corporation, All rights reserved. =============== | ||
// | ||
// Purpose: Custom inspector display for SteamVR_Camera | ||
// | ||
//============================================================================= | ||
|
||
using UnityEngine; | ||
using UnityEditor; | ||
using System.IO; | ||
|
||
[CustomEditor(typeof(SteamVR_Camera)), CanEditMultipleObjects] | ||
public class SteamVR_Editor : Editor | ||
{ | ||
int bannerHeight = 150; | ||
Texture logo; | ||
|
||
SerializedProperty script, wireframe; | ||
|
||
string GetResourcePath() | ||
{ | ||
var ms = MonoScript.FromScriptableObject(this); | ||
var path = AssetDatabase.GetAssetPath(ms); | ||
path = Path.GetDirectoryName(path); | ||
return path.Substring(0, path.Length - "Editor".Length) + "Textures/"; | ||
} | ||
|
||
void OnEnable() | ||
{ | ||
var resourcePath = GetResourcePath(); | ||
|
||
logo = AssetDatabase.LoadAssetAtPath<Texture2D>(resourcePath + "logo.png"); | ||
|
||
script = serializedObject.FindProperty("m_Script"); | ||
|
||
wireframe = serializedObject.FindProperty("wireframe"); | ||
|
||
foreach (SteamVR_Camera target in targets) | ||
target.ForceLast(); | ||
} | ||
|
||
public override void OnInspectorGUI() | ||
{ | ||
serializedObject.Update(); | ||
|
||
var rect = GUILayoutUtility.GetRect(Screen.width - 38, bannerHeight, GUI.skin.box); | ||
if (logo) | ||
GUI.DrawTexture(rect, logo, ScaleMode.ScaleToFit); | ||
|
||
if (!Application.isPlaying) | ||
{ | ||
var expand = false; | ||
var collapse = false; | ||
foreach (SteamVR_Camera target in targets) | ||
{ | ||
if (AssetDatabase.Contains(target)) | ||
continue; | ||
if (target.isExpanded) | ||
collapse = true; | ||
else | ||
expand = true; | ||
} | ||
|
||
if (expand) | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
if (GUILayout.Button("Expand")) | ||
{ | ||
foreach (SteamVR_Camera target in targets) | ||
{ | ||
if (AssetDatabase.Contains(target)) | ||
continue; | ||
if (!target.isExpanded) | ||
{ | ||
target.Expand(); | ||
EditorUtility.SetDirty(target); | ||
} | ||
} | ||
} | ||
GUILayout.Space(18); | ||
GUILayout.EndHorizontal(); | ||
} | ||
|
||
if (collapse) | ||
{ | ||
GUILayout.BeginHorizontal(); | ||
if (GUILayout.Button("Collapse")) | ||
{ | ||
foreach (SteamVR_Camera target in targets) | ||
{ | ||
if (AssetDatabase.Contains(target)) | ||
continue; | ||
if (target.isExpanded) | ||
{ | ||
target.Collapse(); | ||
EditorUtility.SetDirty(target); | ||
} | ||
} | ||
} | ||
GUILayout.Space(18); | ||
GUILayout.EndHorizontal(); | ||
} | ||
} | ||
|
||
EditorGUILayout.PropertyField(script); | ||
EditorGUILayout.PropertyField(wireframe); | ||
|
||
serializedObject.ApplyModifiedProperties(); | ||
} | ||
|
||
public static void ExportPackage() | ||
{ | ||
AssetDatabase.ExportPackage(new string[] { | ||
"Assets/SteamVR", | ||
"Assets/Plugins/openvr_api.cs", | ||
"Assets/Plugins/openvr_api.bundle", | ||
"Assets/Plugins/x86/openvr_api.dll", | ||
"Assets/Plugins/x86/steam_api.dll", | ||
"Assets/Plugins/x86/libsteam_api.so", | ||
"Assets/Plugins/x86_64/openvr_api.dll", | ||
"Assets/Plugins/x86_64/steam_api.dll", | ||
"Assets/Plugins/x86_64/libsteam_api.so", | ||
"Assets/Plugins/x86_64/libopenvr_api.so", | ||
}, "steamvr.unitypackage", ExportPackageOptions.Recurse); | ||
EditorApplication.Exit(0); | ||
} | ||
} | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.