Skip to content

Commit a018a45

Browse files
authored
Merge pull request #7072 from keveleigh/fix-menu-path
Update some asset menu paths
2 parents 734ae55 + 2d09e92 commit a018a45

File tree

6 files changed

+21
-8
lines changed

6 files changed

+21
-8
lines changed

Assets/MixedRealityToolkit.Extensions/HandPhysicsService/HandPhysicsServiceProfile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Microsoft.MixedReality.Toolkit.Extensions.HandPhysics
99
/// Configuration profile for <see cref="HandPhysicsService"/> extension service.
1010
/// </summary>
1111
[MixedRealityServiceProfile(typeof(IHandPhysicsService))]
12-
[CreateAssetMenu(fileName = "HandPhysicsServiceProfile", menuName = "MixedRealityToolkit/Hand Physics Service Configuration Profile")]
12+
[CreateAssetMenu(fileName = "HandPhysicsServiceProfile", menuName = "Mixed Reality Toolkit/Extensions/Hand Physics Service/Hand Physics Service Configuration Profile")]
1313
public class HandPhysicsServiceProfile : BaseMixedRealityProfile
1414
{
1515
/// <summary>

Assets/MixedRealityToolkit.Extensions/LostTrackingService/LostTrackingServiceProfile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.MixedReality.Toolkit.Extensions.Tracking
1010
/// The profile definition for an <see cref="ILostTrackingService"/>.
1111
/// </summary>
1212
[MixedRealityServiceProfile(typeof(ILostTrackingService))]
13-
[CreateAssetMenu(fileName = "LostTrackingServiceProfile", menuName = "Mixed Reality Toolkit/Profiles/Mixed Reality Lost Tracking Service Profile")]
13+
[CreateAssetMenu(fileName = "LostTrackingServiceProfile", menuName = "Mixed Reality Toolkit/Extensions/Lost Tracking Service/Mixed Reality Lost Tracking Service Profile")]
1414
public class LostTrackingServiceProfile : BaseMixedRealityProfile
1515
{
1616
/// <summary>

Assets/MixedRealityToolkit.Extensions/SceneTransitionService/SceneTransitionServiceProfile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Microsoft.MixedReality.Toolkit.Extensions.SceneTransitions
88
{
99
[MixedRealityServiceProfile(typeof(ISceneTransitionService))]
10-
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Profiles/Scene Transition Service Profile", fileName = "SceneTransitionServiceProfile", order = 100)]
10+
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Extensions/Scene Transition Service/Scene Transition Service Profile", fileName = "SceneTransitionServiceProfile", order = 100)]
1111
public class SceneTransitionServiceProfile : BaseMixedRealityProfile
1212
{
1313
public bool UseDefaultProgressIndicator => useDefaultProgressIndicator;

Assets/MixedRealityToolkit.Providers/UnityAR/UnityARCameraSettingsProfile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
namespace Microsoft.MixedReality.Toolkit.Experimental.UnityAR
88
{
99
/// <summary>
10-
/// Configuration profile for the XR Camera settings provider.
10+
/// Configuration profile for the XR camera settings provider.
1111
/// </summary>
12-
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Profiles/Unity AR Foundation Camera Settings Profile", fileName = "DefaultUnityARCameraSettingsProfile", order = 100)]
12+
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Providers/Unity AR/Unity AR Foundation Camera Settings Profile", fileName = "DefaultUnityARCameraSettingsProfile", order = 100)]
1313
[MixedRealityServiceProfile(typeof(UnityARCameraSettings))]
1414
public class UnityARCameraSettingsProfile : BaseCameraSettingsProfile
1515
{

Assets/MixedRealityToolkit.Providers/WindowsMixedReality/Shared/WindowsMixedRealityCameraSettingsProfile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
namespace Microsoft.MixedReality.Toolkit.WindowsMixedReality
88
{
99
/// <summary>
10-
/// Configuration profile for the Windows Mixed Reality Camera settings provider.
10+
/// Configuration profile for the Windows Mixed Reality camera settings provider.
1111
/// </summary>
12-
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Profiles/Windows Mixed Reality Camera Settings Profile", fileName = "WindowsMixedRealityCameraSettingsProfile", order = 100)]
12+
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Providers/Windows Mixed Reality/Windows Mixed Reality Camera Settings Profile", fileName = "WindowsMixedRealityCameraSettingsProfile", order = 100)]
1313
[MixedRealityServiceProfile(typeof(BaseWindowsMixedRealityCameraSettings))]
1414
public class WindowsMixedRealityCameraSettingsProfile : BaseCameraSettingsProfile
1515
{

Documentation/Contributing/CodingGuidelines.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Omitting the namespace for an interface, class or data type will cause your chan
9797

9898
### Adding new MonoBehaviour scripts
9999

100-
When adding new MonoBehaviour scripts with a pull-request, ensure the [`AddComponentMenu`](https://docs.unity3d.com/ScriptReference/AddComponentMenu.html) attribute is applied to all applicable files. This ensures the component is easily discoverable in the editor under the *Add Component* button. The attribute flag is not necessary if the component cannot show up in editor such as an abstract class.
100+
When adding new MonoBehaviour scripts with a pull request, ensure the [`AddComponentMenu`](https://docs.unity3d.com/ScriptReference/AddComponentMenu.html) attribute is applied to all applicable files. This ensures the component is easily discoverable in the editor under the *Add Component* button. The attribute flag is not necessary if the component cannot show up in editor such as an abstract class.
101101

102102
In the example below, the *Package here* should be filled with the package location of the component. If placing an item in *MixedRealityToolkit.SDK* folder, then the package will be *SDK*. If placing an item in the *MixedRealityToolkit* folder, then use *Core* as the string to insert.
103103

@@ -106,6 +106,19 @@ In the example below, the *Package here* should be filled with the package locat
106106
public class MyNewComponent : MonoBehaviour
107107
```
108108

109+
### Adding new ScriptableObjects
110+
111+
When adding new ScriptableObject scripts, ensure the [`CreateAssetMenu`](https://docs.unity3d.com/ScriptReference/CreateAssetMenu.html) attribute is applied to all applicable files. This ensures the component is easily discoverable in the editor via the asset creation menus. The attribute flag is not necessary if the component cannot show up in editor such as an abstract class.
112+
113+
In the example below, the *Subfolder* should be filled with the MRTK subfolder, if applicable. If placing an item in *MixedRealityToolkit.Providers* folder, then the package will be *Providers*. If placing an item in the *MixedRealityToolkit* folder, set this to "Profiles".
114+
115+
In the example below, the *MyNewService | MyNewProvider* should be filled with the your new class' name, if applicable. If placing an item in the *MixedRealityToolkit* folder, leave this string out.
116+
117+
```c#
118+
[CreateAssetMenu(fileName = "MyNewProfile", menuName = "Mixed Reality Toolkit/{Subfolder}/{MyNewService | MyNewProvider}/MyNewProfile")]
119+
public class MyNewProfile : ScriptableObject
120+
```
121+
109122
### Spaces vs tabs
110123

111124
Please be sure to use 4 spaces instead of tabs when contributing to this project.

0 commit comments

Comments
 (0)