MixedRealityToolkit-Unity: The IsInteractable function in InteractionReceiver is not matching gameobjects from ObjectCollection
Overview
The IsInteractables function in InteractionReceiver is not matching my gameobjects from ObjectCollection
protected bool Isinteractable(GameObject interactable)
{
return (interactables != null && interactables.Contains(interactable));
}
Expected Behavior
Even though im doing this…
public class RegisterWithInteractionReceiver : MonoBehaviour {
[SerializeField]
public GameScreen m_InteractionReceiver;
[SerializeField]
public ObjectCollection m_Interactables;
// Use this for initialization
void Awake () {
if (m_Interactables != null)
{
if (m_InteractionReceiver != null)
{
foreach (CollectionNode node in m_Interactables.NodeList)
{
m_InteractionReceiver.Registerinteractable(node.transform.gameObject);
}
}
}
}
}
Actual Behavior
When i use the immediate window both interactable and interactable[2] have the same values… “Difficulty (UnityEngine.GameObject)” base: “Difficulty (UnityEngine.GameObject)” activeInHierarchy: true activeSelf: true gameObject: “Difficulty (UnityEngine.GameObject)” isStatic: false layer: 5 scene: {UnityEngine.SceneManagement.Scene} tag: “Untagged” transform: “Difficulty (UnityEngine.Transform)”
Steps to reproduce
wire up the RegisterWithInteractionReceiver.cs above with a InteractionReceiver and ObjectCollection representing some buttons
Unity Editor Version
2017.2.1.f1
Mixed Reality Toolkit Release Version
Current version MixedRealityToolkit for Unity 2017.2.1f1
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 21 (10 by maintainers)
We’re working on it tho.
I’ll take a look today to see. I’m doing a refactor anyway so I’ll be sure to verify it’s fixed.
Oh my apologies, you mean the current interaction input receiver is doing this. Yeah maybe that class needs to he updated, but the core input system shouldn’t be changed at this time.
No. I’m not suggesting that at all.