diff --git a/Editor/Innoactive.CreatorEditor.XRInteraction.asmdef b/Editor/Innoactive.CreatorEditor.XRInteraction.asmdef
index d74c466..d0d19ae 100644
--- a/Editor/Innoactive.CreatorEditor.XRInteraction.asmdef
+++ b/Editor/Innoactive.CreatorEditor.XRInteraction.asmdef
@@ -29,6 +29,11 @@
"name": "com.unity.xr.interaction.toolkit",
"expression": "0.10.0-preview",
"define": "XRIT_0_10_OR_NEWER"
+ },
+ {
+ "name": "com.unity.xr.interaction.toolkit",
+ "expression": "1.0.0-pre.2",
+ "define": "XRIT_1_0_OR_NEWER"
}
],
"noEngineReferences": false
diff --git a/Editor/Interaction/InteractableObjectEditor.cs b/Editor/Interaction/InteractableObjectEditor.cs
index 2ed1c5d..b3b51af 100644
--- a/Editor/Interaction/InteractableObjectEditor.cs
+++ b/Editor/Interaction/InteractableObjectEditor.cs
@@ -29,6 +29,10 @@ internal class InteractableObjectEditor : Editor
private SerializedProperty gravityOnDetachProperty;
private SerializedProperty retainTransformParentProperty;
+#if XRIT_1_0_OR_NEWER
+ private SerializedProperty customReticle;
+#endif
+
private SerializedProperty onFirstHoverEntered;
private SerializedProperty onHoverEntered;
private SerializedProperty onHoverExited;
@@ -78,6 +82,10 @@ private static class Tooltips
public static readonly GUIContent IsGrabbable = new GUIContent("Is Grabbable", "Determines if this Interactable Object can be grabbed.");
public static readonly GUIContent IsUsable = new GUIContent("Is Usable", "Determines if this Interactable Object can be used.");
public static readonly GUIContent HighlightOptions = new GUIContent("Enable Highlighting", "Adds an InteractableHighlighter component to this Interactable.");
+
+#if XRIT_1_0_OR_NEWER
+ public static readonly GUIContent CustomReticle = EditorGUIUtility.TrTextContent("Custom Reticle", "The reticle that will appear at the end of the line when it is valid.");
+#endif
}
private void OnEnable()
@@ -101,9 +109,16 @@ private void OnEnable()
throwSmoothingCurveProperty = serializedObject.FindProperty("m_ThrowSmoothingCurve");
throwVelocityScaleProperty = serializedObject.FindProperty("m_ThrowVelocityScale");
throwAngularVelocityScaleProperty = serializedObject.FindProperty("m_ThrowAngularVelocityScale");
- gravityOnDetachProperty = serializedObject.FindProperty("m_GravityOnDetach");
retainTransformParentProperty = serializedObject.FindProperty("m_RetainTransformParent");
interactionManager = serializedObject.FindProperty("m_InteractionManager");
+
+#if XRIT_1_0_OR_NEWER
+ gravityOnDetachProperty = serializedObject.FindProperty("m_ForceGravityOnDetach");
+ customReticle = serializedObject.FindProperty("m_CustomReticle");
+#else
+ gravityOnDetachProperty = serializedObject.FindProperty("m_GravityOnDetach");
+#endif
+
#if XRIT_0_10_OR_NEWER
onFirstHoverEntered = serializedObject.FindProperty("m_OnFirstHoverEntered");
onHoverEntered = serializedObject.FindProperty("m_OnHoverEntered");
@@ -154,6 +169,10 @@ public override void OnInspectorGUI()
EditorGUILayout.PropertyField(interactionLayerMaskProperty, Tooltips.InteractionLayerMask);
EditorGUILayout.PropertyField(collidersProperty, Tooltips.Colliders, true);
+#if XRIT_1_0_OR_NEWER
+ EditorGUILayout.PropertyField(customReticle, Tooltips.CustomReticle);
+#endif
+
EditorGUILayout.Space();
EditorGUILayout.PropertyField(movementTypeProperty, Tooltips.MovementType);
diff --git a/Editor/XRInteractionSceneSetup.cs b/Editor/XRInteractionSceneSetup.cs
index afd8561..129ebb3 100644
--- a/Editor/XRInteractionSceneSetup.cs
+++ b/Editor/XRInteractionSceneSetup.cs
@@ -4,15 +4,15 @@
namespace Innoactive.CreatorEditor.XRInteraction
{
-
///
/// Scene setup for XR-Interaction.
///
public class XRInteractionSceneSetup : InteractionFrameworkSceneSetup
{
private const string Title = "Obsolete XR Ring detected";
-
- private const string Message = "Creator changed the Rig loading to a new dynamic system, you still have the old XR_Setup in the current scene, do you want to delete it?";
+
+ ///
+ public override string Key { get; } = "XRInteractionSetup";
///
public override void Setup()
@@ -26,9 +26,9 @@ private void DeleteStaticObject(string objectName)
if (objectToDelete != null)
{
- string Message = $"Creator changed the XR Rig loading to a new dynamic system, you have a static {objectName} in the current scene, do you want to delete it?";
+ string message = $"Creator changed the XR Rig loading to a new dynamic system, you have a static {objectName} in the current scene, do you want to delete it?";
- if (EditorUtility.DisplayDialog(Title, Message, "Delete", "Skip"))
+ if (EditorUtility.DisplayDialog(Title, message, "Delete", "Skip"))
{
EditorUtility.SetDirty(objectToDelete);
Object.DestroyImmediate(objectToDelete);
diff --git a/Runtime/Rigs/XRSetupBase.cs b/Runtime/Rigs/XRSetupBase.cs
index dbd8ef7..7b2e264 100644
--- a/Runtime/Rigs/XRSetupBase.cs
+++ b/Runtime/Rigs/XRSetupBase.cs
@@ -8,7 +8,7 @@ public abstract class XRSetupBase : InteractionRigProvider
{
protected bool IsEventManagerInScene()
{
- return GameObject.FindObjectOfType() != null;
+ return Object.FindObjectOfType() != null;
}
}
}
\ No newline at end of file