Shadowing
Member
So I'm making a Interactable where I walk up and talk to a NPC
The 2nd Debug.Log comes up null.
The First Debug is pointing not to the gameObject my Interactable is on. Which is why its null.
Looks like it grabs the first GameObject it finds a collider attached too. In this case CapsuleCollider for the character
So idk Is this attended behavior? Shouldn't it use the collider of the InteractableTarget?
Interactable doesn't even require a collider anymore does it?
Here is the entire method of my ability in case you don't understand where im referring too
The 2nd Debug.Log comes up null.
The First Debug is pointing not to the gameObject my Interactable is on. Which is why its null.
Looks like it grabs the first GameObject it finds a collider attached too. In this case CapsuleCollider for the character
So idk Is this attended behavior? Shouldn't it use the collider of the InteractableTarget?
Interactable doesn't even require a collider anymore does it?
Code:
Debug.Log(obj.name);
Debug.Log(obj.GetCachedComponent<Interactable>());
// The object must have the Interactable component.
if ((m_Interactable = obj.GetCachedComponent<Interactable>()) != null) {
Here is the entire method of my ability in case you don't understand where im referring too
Code:
protected override bool ValidateObject(GameObject obj, bool fromTrigger)
{
if (!base.ValidateObject(obj, fromTrigger)) {
return false;
}
if (m_Interactable != null) {
return obj == m_Interactable.gameObject;
}
Debug.Log(obj.name);
Debug.Log(obj.GetCachedComponent<Interactable>());
// The object must have the Interactable component.
if ((m_Interactable = obj.GetCachedComponent<Interactable>()) != null) {
// If the ID is used then the IDs must match.
if (m_InteractableID != -1 && m_Interactable.ID != m_InteractableID) {
m_Interactable = null;
return false;
}
return true;
}
return false;
}