Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
renamed an internal method and updated any copy references to clone w…
Browse files Browse the repository at this point in the history
…here appropriate (#92)
  • Loading branch information
StephenHodgson authored Apr 19, 2019
1 parent a84384e commit 2fba530
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Inspectors/Profiles/BaseMixedRealityProfileInspector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ private static bool RenderProfileInternal(SerializedProperty property, GUIConten
return changed;
}

[MenuItem("CONTEXT/BaseMixedRealityProfile/Create Copy from Profile Values", false, 0)]
protected static async void CreateCopyProfileValues()
[MenuItem("CONTEXT/BaseMixedRealityProfile/Create Clone from Profile Values", false, 0)]
protected static async void CreateCloneProfile()
{
profileToCopy = profile;
ScriptableObject newProfile = CreateInstance(profile.GetType().ToString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,8 @@ protected override void OnEnable()
}
}

if (!MixedRealityToolkit.ConfirmInitialized())
{
return;
}

if (!MixedRealityToolkit.HasActiveProfile)
if (!MixedRealityToolkit.ConfirmInitialized() ||
!MixedRealityToolkit.HasActiveProfile)
{
return;
}
Expand Down Expand Up @@ -135,9 +131,9 @@ public override void OnInspectorGUI()
"You can use the default profiles provided, copy and customize the default profiles, or create your own.", MessageType.Warning);
EditorGUILayout.BeginHorizontal();

if (GUILayout.Button("Copy & Customize"))
if (GUILayout.Button("Clone & Customize"))
{
CreateCopyProfileValues();
CreateCloneProfile();
}

if (GUILayout.Button("Create new profiles"))
Expand Down

0 comments on commit 2fba530

Please sign in to comment.