Skip to content

Commit da08e74

Browse files
authored
Merge pull request #31 from Unity-Technologies/staging
0.0.1 release - staging->master
2 parents 689bafe + a93ff3b commit da08e74

File tree

992 files changed

+149639
-10446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

992 files changed

+149639
-10446
lines changed

.gitmodules

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[submodule "libs/input-prototype"]
2+
path = libs/input-prototype
3+
url=https://github.com/Unity-Technologies/input-prototype.git
4+
branch = editorvr/main
5+
[submodule "libs/UnityOctree"]
6+
path = libs/UnityOctree
7+
url=https://github.com/Unity-Technologies/UnityOctree.git

.hgsub

-1
This file was deleted.

.hgsubstate-history

-1
This file was deleted.

Action Maps/Default.asset

-26
This file was deleted.

Action Maps/Default.cs

-10
This file was deleted.

Action Maps/ShowMenu.asset Action Maps/DirectSelectInput.asset

+40-8
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ MonoBehaviour:
99
m_Enabled: 1
1010
m_EditorHideFlags: 0
1111
m_Script: {fileID: 11500000, guid: 24e5bc088c9caeb44bc4283dc321b033, type: 3}
12-
m_Name: ShowMenu
12+
m_Name: DirectSelectInput
1313
m_EditorClassIdentifier:
1414
m_RunInEditMode: 0
1515
m_Actions:
16-
- {fileID: 114000013407218016}
16+
- {fileID: 114000012349872818}
17+
- {fileID: 114000013014554554}
1718
m_ControlSchemes:
18-
- m_Name: VR
19+
- m_Name: VRInputDevice
1920
m_DeviceSlots:
2021
- m_Key: 1
2122
m_Type:
@@ -25,17 +26,27 @@ MonoBehaviour:
2526
m_ActionMap: {fileID: 11400000}
2627
m_Bindings:
2728
- sources:
28-
- controlIndex: 22
29+
- controlIndex: 2
2930
deviceKey: 1
3031
deadZone: 0.3
3132
buttonAxisSources: []
3233
gravity: 1000
3334
sensitivity: 1000
3435
snap: 1
3536
primaryIsButtonAxis: 0
36-
m_MapTypeName: ShowMenu, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
37+
- sources:
38+
- controlIndex: 3
39+
deviceKey: 1
40+
deadZone: 0.3
41+
buttonAxisSources: []
42+
gravity: 1000
43+
sensitivity: 1000
44+
snap: 1
45+
primaryIsButtonAxis: 0
46+
m_MapTypeName: DirectSelectInput, Assembly-CSharp, Version=0.0.0.0, Culture=neutral,
47+
PublicKeyToken=null
3748
m_CustomNamespace:
38-
--- !u!114 &114000013407218016
49+
--- !u!114 &114000012349872818
3950
MonoBehaviour:
4051
m_ObjectHideFlags: 0
4152
m_PrefabParentObject: {fileID: 0}
@@ -44,7 +55,7 @@ MonoBehaviour:
4455
m_Enabled: 1
4556
m_EditorHideFlags: 0
4657
m_Script: {fileID: 11500000, guid: 5eba7b4b2e3ea134991ccbff5f47c2c8, type: 3}
47-
m_Name: ShowMenu
58+
m_Name: Select
4859
m_EditorClassIdentifier:
4960
m_RunInEditMode: 0
5061
m_ActionMap: {fileID: 11400000}
@@ -54,5 +65,26 @@ MonoBehaviour:
5465
controlType:
5566
m_TypeName: UnityEngine.InputNew.ButtonInputControl, Assembly-CSharp, Version=0.0.0.0,
5667
Culture=neutral, PublicKeyToken=null
57-
name: Show
68+
name: Select
69+
defaultValue: 0
70+
--- !u!114 &114000013014554554
71+
MonoBehaviour:
72+
m_ObjectHideFlags: 0
73+
m_PrefabParentObject: {fileID: 0}
74+
m_PrefabInternal: {fileID: 0}
75+
m_GameObject: {fileID: 0}
76+
m_Enabled: 1
77+
m_EditorHideFlags: 0
78+
m_Script: {fileID: 11500000, guid: 5eba7b4b2e3ea134991ccbff5f47c2c8, type: 3}
79+
m_Name: Multi Select
80+
m_EditorClassIdentifier:
81+
m_RunInEditMode: 0
82+
m_ActionMap: {fileID: 11400000}
83+
m_ActionIndex: 1
84+
m_ControlData:
85+
componentControlIndices:
86+
controlType:
87+
m_TypeName: UnityEngine.InputNew.ButtonInputControl, Assembly-CSharp, Version=0.0.0.0,
88+
Culture=neutral, PublicKeyToken=null
89+
name: Multi Select
5890
defaultValue: 0

Tools/JoystickLocomotionTool/JoystickLocomotion.asset.meta Action Maps/DirectSelectInput.asset.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Action Maps/DirectSelectInput.cs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using UnityEngine;
2+
using UnityEngine.InputNew;
3+
4+
// GENERATED FILE - DO NOT EDIT MANUALLY
5+
namespace UnityEngine.InputNew
6+
{
7+
public class DirectSelectInput : ActionMapInput {
8+
public DirectSelectInput (ActionMap actionMap) : base (actionMap) { }
9+
10+
public ButtonInputControl @select { get { return (ButtonInputControl)this[0]; } }
11+
public ButtonInputControl @multiSelect { get { return (ButtonInputControl)this[1]; } }
12+
}
13+
}

Action Maps/Default.cs.meta Action Maps/DirectSelectInput.cs.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Action Maps/ShowMenu.cs

-12
This file was deleted.

Action Maps/UIActions.asset

+31
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ MonoBehaviour:
1515
m_Actions:
1616
- {fileID: 114000012573131854}
1717
- {fileID: 114000010783367338}
18+
- {fileID: 114000011897076616}
1819
m_ControlSchemes:
1920
- m_Name: VRInput
2021
m_DeviceSlots:
@@ -43,6 +44,15 @@ MonoBehaviour:
4344
sensitivity: 1000
4445
snap: 1
4546
primaryIsButtonAxis: 0
47+
- sources:
48+
- controlIndex: 0
49+
deviceKey: 1
50+
deadZone: 0.3
51+
buttonAxisSources: []
52+
gravity: 1000
53+
sensitivity: 1000
54+
snap: 1
55+
primaryIsButtonAxis: 0
4656
m_MapTypeName: UIActions, Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
4757
m_CustomNamespace:
4858
--- !u!114 &114000010783367338
@@ -66,6 +76,27 @@ MonoBehaviour:
6676
Culture=neutral, PublicKeyToken=null
6777
name: VerticalScroll
6878
defaultValue: 0
79+
--- !u!114 &114000011897076616
80+
MonoBehaviour:
81+
m_ObjectHideFlags: 0
82+
m_PrefabParentObject: {fileID: 0}
83+
m_PrefabInternal: {fileID: 0}
84+
m_GameObject: {fileID: 0}
85+
m_Enabled: 1
86+
m_EditorHideFlags: 0
87+
m_Script: {fileID: 11500000, guid: 5eba7b4b2e3ea134991ccbff5f47c2c8, type: 3}
88+
m_Name: HorizontalScroll
89+
m_EditorClassIdentifier:
90+
m_RunInEditMode: 0
91+
m_ActionMap: {fileID: 11400000}
92+
m_ActionIndex: 2
93+
m_ControlData:
94+
componentControlIndices:
95+
controlType:
96+
m_TypeName: UnityEngine.InputNew.AxisInputControl, Assembly-CSharp, Version=0.0.0.0,
97+
Culture=neutral, PublicKeyToken=null
98+
name: HorizontalScroll
99+
defaultValue: 0
69100
--- !u!114 &114000012573131854
70101
MonoBehaviour:
71102
m_ObjectHideFlags: 0

Action Maps/UIActions.cs

+1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ public UIActions (ActionMap actionMap) : base (actionMap) { }
99

1010
public ButtonInputControl @select { get { return (ButtonInputControl)this[0]; } }
1111
public AxisInputControl @verticalScroll { get { return (AxisInputControl)this[1]; } }
12+
public AxisInputControl @horizontalScroll { get { return (AxisInputControl)this[2]; } }
1213
}
1314
}

Scripts/Utilities/U.meta Actions.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Actions/BaseAction.cs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#if UNITY_EDITOR
2+
using UnityEngine;
3+
4+
namespace UnityEditor.Experimental.EditorVR.Actions
5+
{
6+
/// <summary>
7+
/// A convenience class for simple action implementations
8+
/// </summary>
9+
abstract class BaseAction : MonoBehaviour, IAction
10+
{
11+
public Sprite icon
12+
{
13+
get { return m_Icon; }
14+
}
15+
16+
[SerializeField]
17+
Sprite m_Icon;
18+
19+
public abstract void ExecuteAction();
20+
}
21+
}
22+
#endif

Scripts/Data/TransformMode.cs.meta Actions/BaseAction.cs.meta

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Actions/Clone.cs

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#if UNITY_EDITOR
2+
using System;
3+
using UnityEditor.Experimental.EditorVR.Utilities;
4+
using UnityEngine;
5+
6+
namespace UnityEditor.Experimental.EditorVR.Actions
7+
{
8+
[ActionMenuItem("Clone", ActionMenuItemAttribute.DefaultActionSectionName, 3)]
9+
sealed class Clone : BaseAction, IUsesSpatialHash
10+
{
11+
public Action<GameObject> addToSpatialHash { private get; set; }
12+
public Action<GameObject> removeFromSpatialHash { private get; set; }
13+
14+
public override void ExecuteAction()
15+
{
16+
var selection = Selection.gameObjects;
17+
var bounds = ObjectUtils.GetBounds(selection);
18+
foreach (var s in selection)
19+
{
20+
var clone = ObjectUtils.Instantiate(s.gameObject);
21+
clone.hideFlags = HideFlags.None;
22+
var cloneTransform = clone.transform;
23+
var cameraTransform = CameraUtils.GetMainCamera().transform;
24+
var viewDirection = cloneTransform.position - cameraTransform.position;
25+
cloneTransform.position = cameraTransform.TransformPoint(Vector3.forward * viewDirection.magnitude)
26+
+ cloneTransform.position - bounds.center;
27+
addToSpatialHash(clone);
28+
}
29+
}
30+
}
31+
}
32+
#endif

Actions/Clone.cs.meta

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Actions/Copy.cs

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#if UNITY_EDITOR
2+
namespace UnityEditor.Experimental.EditorVR.Actions
3+
{
4+
[ActionMenuItem("Copy", ActionMenuItemAttribute.DefaultActionSectionName, 5)]
5+
sealed class Copy : BaseAction
6+
{
7+
public override void ExecuteAction()
8+
{
9+
//bug (case 451825)
10+
//http://forum.unity3d.com/threads/editorapplication-ExecuteActionmenuitem-dont-include-edit-menu.148215/
11+
//return EditorApplication.ExecuteActionMenuItem("Edit/Copy");
12+
13+
Paste.buffer = Selection.gameObjects;
14+
}
15+
}
16+
}
17+
#endif

Actions/Copy.cs.meta

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Actions/Cut.cs

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#if UNITY_EDITOR
2+
using UnityEngine;
3+
4+
namespace UnityEditor.Experimental.EditorVR.Actions
5+
{
6+
[ActionMenuItem("Cut", ActionMenuItemAttribute.DefaultActionSectionName, 4)]
7+
sealed class Cut : BaseAction
8+
{
9+
public override void ExecuteAction()
10+
{
11+
//bug (case 451825)
12+
//http://forum.unity3d.com/threads/editorapplication-ExecuteActionmenuitem-dont-include-edit-menu.148215/
13+
//return EditorApplication.ExecuteActionMenuItem("Edit/Cut");
14+
15+
var selection = Selection.gameObjects;
16+
if (selection != null)
17+
{
18+
foreach (var go in selection)
19+
{
20+
go.hideFlags = HideFlags.HideAndDontSave;
21+
go.SetActive(false);
22+
}
23+
24+
Paste.buffer = selection;
25+
Selection.activeGameObject = null;
26+
}
27+
}
28+
}
29+
}
30+
#endif

0 commit comments

Comments
 (0)