Call global class inside a namespaced one

Having:

class Daplayer : MonoBehaviour {
    public static bool isDead = false;
}

I want to call it inside a namespace:

namespace UnityStandardAssets.Characters.ThirdPerson
{
    [RequireComponent(typeof (ThirdPersonCharacter))]
    public class ThirdPersonUserControl : MonoBehaviour
    {
        void Start () {
            if (Daplayer.isDead) {
                return;
            }
        }
        
    }
}

But i’m getting :

error CS0103: The name `Daplayer' does not exist in the current context.

I’ve also tried global::Daplayer, but doesnt work either.

Reading from your comments.

I think it has to do with the compilation order.

As you can see in that link, your ThirdPersonUserControl is compiled in phase 1, your Daplayer is compiled in phase 3.

Meaning that when ThirdPersonUserControl gets compiled, Daplayer is not compiled yet and thus doesn’t exist yet. Hence the error.

So to fix this, make sure Daplayer is compiled in either the same phase or an earlier phase.

The basic rule is that anything that will be compiled in a phase after the current one cannot be referenced. Anything that is compiled in the current phase or an earlier phase is fully available

You are missing the point of object reference in C#.
The way you use “Daplayer.isDead” refers to the Daplayer as a Type and makes isDead a Static vairable that does not exist.

You might want to do some more tutorials on C# programming, because these are the absolute basics.
Want you want to do is find the “Daplayer” component that is present on a GameObject somewhere I presume and then use that specific value.

Also the if statement should be within a method context and not somewhere floating inside a class, this won’t even compile like this.
Here’s how it should look:

Daplayer class:

public class Daplayer : MonoBehaviour
{
    public bool IsDead;
}

ThirdPersonUserControl class:

namespace UnityStandardAssets.Characters.ThirdPerson
{
    [RequireComponent(typeof(ThirdPersonCharacter))]
    public class ThirdPersonUserControl : MonoBehaviour
    {
        private Daplayer daplayer;

        protected void Awake()
        {
            // FindObjectOfType is really ugly in this context, but it garantees this code will work on your end
            daplayer = FindObjectOfType<Daplayer>();
        }

        protected void Update()
        {
            if (daplayer.IsDead)
            {
               Debug.Log("The player is dead");
            }
        }
     }
}