How to commuunicate scripts form default namespace?

Hi,
I got a problem. How to take values form script One to script Two, when the first script is in different namespace?
I mean i got something just like this (let’s say it is so short) first script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ScriptOne : MonoBehaviour
{
public float iWantThisVariableInAnotherScript;
}

And I want to have an access to this variable in another script (it’s ready script in Unity -
FirstPersonController, so I guess all of you know that script). And it looks like:

   namespace UnityStandardAssets.Characters.FirstPerson
   {
       [RequireComponent(typeof (CharacterController))]
       [RequireComponent(typeof (AudioSource))]
       public class FirstPersonController : MonoBehaviour
       {
           AND HERE, HOW TO GET ACCESS TO MY public float iWantThisVariableInAnotherScript ??
       }
   }

I am sorry for my spelling mistakes, be permissive :slight_smile:
I’m waiting for Your responses.

As far as I know, cleanest way to do this is to put your script in a namespace.
Then use that namespace in the script where you want to access the variable.
So, the first script can be like this:

  
using System.Collections;  
using System.Collections.Generic;
using UnityEngine;
namespace MyNamespace
{
 public class ScriptOne : MonoBehaviour
 {
 public float iWantThisVariableInAnotherScript;
 }
}  
</code> </pre>

After that, you can access the variable in 2nd script like this:  
<pre><code>
using MyNamespace;  
namespace UnityStandardAssets.Characters.FirstPerson
    {
        [RequireComponent(typeof (CharacterController))]
        [RequireComponent(typeof (AudioSource))]
        public class FirstPersonController : MonoBehaviour
        {
            //AND HERE, HOW TO GET ACCESS TO MY public float iWantThisVariableInAnotherScript ??
           //You can access the variable now
        }
    }