Problem with Health Component 'Health' does not contain a definition for 'Damage'

Jorgefo

New member
Hi

I don't know if i skip a step in installation but i have this error.

1619155774788.png

I don't use any of this task error in Behavior Designer yet

For my script OnHitBullet i have this

C#:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Opsive.UltimateCharacterController.Traits;

public class OnHitBullet : MonoBehaviour
{
    [Tooltip("The character that has the health component.")]
    [SerializeField] protected GameObject m_Character;

    private void OnTriggerEnter(Collider other) {
        if(other.gameObject.CompareTag("Player")){
            var health = other.gameObject.GetComponent<Health>();
            // Cause 10 damage to the character.
            health.Damage(10);
            Destroy (gameObject);
        }
    }
}

This is the installation

Unity 2020.3.5 LTS (may be this is the problem?)
Opsive UCC 2.3.1
Opsive Behavior Designer 1.6.8
Integration Behavior Designer + UCC. I dont know what version but I download today.
MacOS Big Sur 11.2.3
 
My guess is that it looks like a namespace conflict. Take a look at the Import Errors section:

 
My guess is that it looks like a namespace conflict. Take a look at the Import Errors section:

Thanks this is the problem, i have a script in the project with the same name health.cs, is from another asset i don't remember the name because is in asset/scripts, i delete this and is working again
 
Top