Skip to content

Commit 786fdb3

Browse files
Merge pull request #529 from Unity-Technologies/staging
0.2 staging -> master
2 parents efa8307 + 559ab99 commit 786fdb3

File tree

838 files changed

+56665
-36621
lines changed

Some content is hidden

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

838 files changed

+56665
-36621
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@
2727
*.wav filter=lfs diff=lfs merge=lfs -crlf
2828
*.zip filter=lfs diff=lfs merge=lfs -crlf
2929
*.lfs.* filter=lfs diff=lfs merge=lfs -crlf
30+
*.unitypackage filter=lfs diff=lfs merge=lfs -crlf

.github/pull_request_template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### Purpose of this PR
2+
3+
[Desc of feature/change. Links to screenshots, design docs, user docs, etc. Remember reviewers may be outside your team, and not know your feature/area that should be explained more.]
4+
5+
### Testing status
6+
7+
[Explanation of what’s tested, how tested and existing or new automation tests. Can include manual testing by self and/or QA. Specify test plans. Rarely acceptable to have no testing.]
8+
9+
### Technical risk
10+
11+
[Overall product level assessment of risk of change. Need technical risk & halo effect.]
12+
13+
### Comments to reviewers
14+
15+
[Info per person for what to focus on, or historical info to understand who have previously reviewed and coverage. Help them get context.]

Actions/BaseAction.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#if UNITY_EDITOR
2-
using UnityEngine;
1+
using UnityEngine;
32

43
namespace UnityEditor.Experimental.EditorVR.Actions
54
{
@@ -19,4 +18,3 @@ public Sprite icon
1918
public abstract void ExecuteAction();
2019
}
2120
}
22-
#endif

Actions/Copy.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
#if UNITY_EDITOR
2-
namespace UnityEditor.Experimental.EditorVR.Actions
1+
namespace UnityEditor.Experimental.EditorVR.Actions
32
{
43
[ActionMenuItem("Copy", ActionMenuItemAttribute.DefaultActionSectionName, 5)]
4+
[SpatialMenuItem("Copy", "Actions", "Copy the selected object")]
55
sealed class Copy : BaseAction
66
{
77
public override void ExecuteAction()
88
{
9+
#if UNITY_EDITOR
910
Unsupported.CopyGameObjectsToPasteboard();
11+
#endif
1012
Paste.SetBufferDistance(Selection.transforms);
1113
}
1214
}
1315
}
14-
#endif

Actions/Cut.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
1-
#if UNITY_EDITOR
2-
using UnityEngine;
1+
using UnityEngine;
32

43
namespace UnityEditor.Experimental.EditorVR.Actions
54
{
65
[ActionMenuItem("Cut", ActionMenuItemAttribute.DefaultActionSectionName, 4)]
6+
[SpatialMenuItem("Cut", "Actions", "Cut the selected object")]
77
sealed class Cut : BaseAction
88
{
99
public override void ExecuteAction()
1010
{
1111
var selection = Selection.transforms;
1212
if (selection != null)
1313
{
14+
#if UNITY_EDITOR
1415
Unsupported.CopyGameObjectsToPasteboard();
16+
#endif
1517
Paste.SetBufferDistance(Selection.transforms);
1618

1719
foreach (var transform in selection)
1820
{
1921
var go = transform.gameObject;
20-
go.hideFlags = HideFlags.HideAndDontSave;
22+
go.hideFlags = HideFlags.HideInHierarchy | HideFlags.DontSaveInEditor;
2123
go.SetActive(false);
2224
}
2325

@@ -26,4 +28,3 @@ public override void ExecuteAction()
2628
}
2729
}
2830
}
29-
#endif

Actions/Delete.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#if UNITY_EDITOR
2-
using System;
1+
using System;
32
using UnityEngine;
43

54
namespace UnityEditor.Experimental.EditorVR.Actions
65
{
76
[ActionMenuItem("Delete", ActionMenuItemAttribute.DefaultActionSectionName, 7)]
7+
[SpatialMenuItem("Delete", "Actions", "Delete the selected object")]
88
sealed class Delete : BaseAction, IDeleteSceneObject
99
{
1010
public Action<GameObject> addToSpatialHash { private get; set; }
@@ -18,10 +18,11 @@ public override void ExecuteAction()
1818
this.DeleteSceneObject(go);
1919
}
2020

21+
#if UNITY_EDITOR
2122
UnityEditor.Undo.IncrementCurrentGroup();
23+
#endif
2224

2325
Selection.activeGameObject = null;
2426
}
2527
}
2628
}
27-
#endif

Actions/Duplicate.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
#if UNITY_EDITOR
2-
using UnityEditor.Experimental.EditorVR.Utilities;
1+
using UnityEditor.Experimental.EditorVR.Utilities;
32
using UnityEngine;
43

54
namespace UnityEditor.Experimental.EditorVR.Actions
65
{
76
[ActionMenuItem("Duplicate", ActionMenuItemAttribute.DefaultActionSectionName, 3)]
7+
[SpatialMenuItem("Duplicate", "Actions", "Duplicate the selected object at the currently focused position")]
88
sealed class Duplicate : BaseAction, IUsesSpatialHash, IUsesViewerScale
99
{
1010
public override void ExecuteAction()
1111
{
12+
#if UNITY_EDITOR
1213
Unsupported.DuplicateGameObjectsUsingPasteboard();
14+
#endif
1315
var selection = Selection.transforms;
1416
var bounds = ObjectUtils.GetBounds(selection);
1517
foreach (var s in selection)
@@ -26,4 +28,3 @@ public override void ExecuteAction()
2628
}
2729
}
2830
}
29-
#endif

Actions/OpenScene.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#if UNITY_EDITOR
2-
using UnityEngine;
1+
using UnityEngine;
32

43
namespace UnityEditor.Experimental.EditorVR.Actions
54
{
@@ -12,4 +11,3 @@ public override void ExecuteAction()
1211
}
1312
}
1413
}
15-
#endif

Actions/Paste.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#if UNITY_EDITOR
2-
using UnityEditor.Experimental.EditorVR.Utilities;
1+
using UnityEditor.Experimental.EditorVR.Utilities;
32
using UnityEngine;
43

54
namespace UnityEditor.Experimental.EditorVR.Actions
65
{
76
[ActionMenuItem("Paste", ActionMenuItemAttribute.DefaultActionSectionName, 6)]
7+
[SpatialMenuItem("Paste", "Actions", "Paste a copied object")]
88
sealed class Paste : BaseAction, IUsesSpatialHash, IUsesViewerScale
99
{
1010
static float s_BufferDistance;
@@ -22,7 +22,9 @@ public static void SetBufferDistance(Transform[] transforms)
2222

2323
public override void ExecuteAction()
2424
{
25+
#if UNITY_EDITOR
2526
Unsupported.PasteGameObjectsFromPasteboard();
27+
#endif
2628
var transforms = Selection.transforms;
2729
var bounds = ObjectUtils.GetBounds(transforms);
2830
foreach (var transform in transforms)
@@ -39,4 +41,3 @@ public override void ExecuteAction()
3941
}
4042
}
4143
}
42-
#endif

Actions/Play.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#if UNITY_EDITOR
2-
namespace UnityEditor.Experimental.EditorVR.Actions
1+
namespace UnityEditor.Experimental.EditorVR.Actions
32
{
43
[ActionMenuItem("Play")]
4+
[SpatialMenuItem("Play", "Actions", "Enter Play-Mode")]
55
sealed class Play : BaseAction
66
{
77
public override void ExecuteAction()
@@ -12,4 +12,3 @@ public override void ExecuteAction()
1212
}
1313
}
1414
}
15-
#endif

0 commit comments

Comments
 (0)