Calling a Function from a namespace..

I have namespace EmotionSystem woith currently 12 Classes.
Ill write her only the class were is the function i want to call to avoid tons of codelines.

namespace EmotionSystem
{
		public enum Personality
		{
				Null,//Done
				Bloody,//Done
				Lovely,//Done
				Tsundeere,//Done
				Kundeere,
				Sadic,
				Friendly,
				Pure
		}
		public enum LifeState
		{
				InLife,
				Fainted,
				MedicalState
		}
		public enum Gender
		{
				Male,
				Female
		}
		public enum PGClass
		{
				Cybertechno,
				Nnja,
				Gangster,
				Tracer,
				APFGuard,
				Soldier
		}
		public class VariableSystem
		{
				public float Life;
				public float MaxLife; //!
				public float Faint;
				public float MaxFaint; //!
				public float MedicalLev;
				public float MaxMedicalLev; //!
				public float Stamina;
				public float MaxStamina; //!
				public float StaminaRecoveryFrequency; //!
				public float StaminaRecoveryPiece; //!
				public float FaintDrainPerSecond; //!
				public float FaintRecoveryPerSecond; //!
				public float MedicalLevDrainPerSecond; //
				public float LifeRecoverPerSecond; //!
				public Personality Character;
				public Gender CharaGender;
				public PGClass Class;
				
				public Personality Assign (Personality A)
				{
						Character = A;
						switch (Character) {
						case Personality.Bloody:
								if (CharaGender == Gender.Male) {
										MaxLife = 1250;
										MaxFaint = 400;
										MaxMedicalLev = 300;
										MaxStamina = 650;
										StaminaRecoveryFrequency = 0.5f;
										StaminaRecoveryPiece = 20;
										FaintDrainPerSecond = 15;
										FaintRecoveryPerSecond = 10;
										MedicalLevDrainPerSecond = 10;
										LifeRecoverPerSecond = 35;
								} else if (CharaGender == Gender.Female) {
										MaxLife = 1000;
										MaxFaint = 600;
										MaxMedicalLev = 375;
										MaxStamina = 510;
										StaminaRecoveryFrequency = 0.8f;
										StaminaRecoveryPiece = 18;
										FaintDrainPerSecond = 10;
										FaintRecoveryPerSecond = 25;
										MedicalLevDrainPerSecond = 10;
										LifeRecoverPerSecond = 18;
								}
								break;
						case Personality.Lovely:
								if (CharaGender == Gender.Male) {
										MaxLife = 1000;
										MaxFaint = 250;
										MaxMedicalLev = 600;
										MaxStamina = 400;
										StaminaRecoveryFrequency = 0.5f;
										StaminaRecoveryPiece = 20;
										FaintDrainPerSecond = 15;
										FaintRecoveryPerSecond = 10;
										MedicalLevDrainPerSecond = 10;
										LifeRecoverPerSecond = 35;
								} else if (CharaGender == Gender.Female) {
										MaxLife = 850;
										MaxFaint = 350;
										MaxMedicalLev = 500;
										MaxStamina = 370;
										StaminaRecoveryFrequency = 0.4f;
										StaminaRecoveryPiece = 18;
										FaintDrainPerSecond = 18;
										FaintRecoveryPerSecond = 8;
										MedicalLevDrainPerSecond = 9;
										LifeRecoverPerSecond = 42;
								}
								break;
						case Personality.Tsundeere:
								if (CharaGender == Gender.Male) {
										MaxLife = 975;
										MaxFaint = 375;
										MaxMedicalLev = 400;
										MaxStamina = 710;
										StaminaRecoveryFrequency = 0.4f;
										StaminaRecoveryPiece = 23;
										FaintDrainPerSecond = 11;
										FaintRecoveryPerSecond = 9;
										MedicalLevDrainPerSecond = 8;
										LifeRecoverPerSecond = 10;
								} else if (CharaGender == Gender.Female) {
										MaxLife = 925;
										MaxFaint = 400;
										MaxMedicalLev = 350;
										MaxStamina = 675;
										StaminaRecoveryFrequency = 0.3f;
										StaminaRecoveryPiece = 20;
										FaintDrainPerSecond = 10;
										FaintRecoveryPerSecond = 9;
										MedicalLevDrainPerSecond = 10;
										LifeRecoverPerSecond = 12;
								}
								break;
						default:
								Debug.LogWarning ("null type personality error");
								break;
						}			
				}
				public void VariablesInit ()
				{
						Life = MaxLife;
						Faint = MaxFaint;
						MedicalLev = MaxMedicalLev;
						Stamina = MaxStamina;
				}
		}

}

And i want to call the function Assign from another clas using EmotionSystem.

public class Player : MonoBehaviour
{

		public void Start ()
		{
				VariableSystem.Assign (Personality.Bloody);
		}

}

But i can’t call it, why?

insanity & boredom got the better of me. apologies to the meatmormon for the number of lines (i’ve minified a little, but still sort of readable)

a sane person might assign the values from an array/external worksheet, but this is an example for the OP to copy/break based on their digits.

namespace EmotionSystem
{
    public enum PersonalityType { Null, Bloody, Lovely, Tsundeere, Kundeere, Sadic, Friendly, Pure };
    public enum LifeState { InLife, Fainted, MedicalState };
    public enum Gender { Male, Female };
    public enum PGClass { Cybertechno, Nnja, Gangster, Tracer, APFGuard, Soldier };

    public class Personality
    {
        public float Life, MaxLife, Faint, MaxFaint, MedicalLev, MaxMedicalLev, Stamina, MaxStamina, StaminaRecoveryFrequency, StaminaRecoveryPiece;
        public float FaintDrainPerSecond, FaintRecoveryPerSecond, MedicalLevDrainPerSecond, LifeRecoverPerSecond;
        public PersonalityType Character;
        public Gender CharaGender;
        public PGClass Class;

        private void SetTraits(float maxLife, float maxFaint, float maxMedicalLev, float maxStamina, float staminaRecoveryFrequency, float staminaRecoveryPiece, float faintDrainPerSecond, float faintRecoveryPerSecond, float medicalLevDrainPerSecond, float lifeRecoverPerSecond)
        {
            MaxLife = maxLife; MaxFaint = maxFaint; MaxMedicalLev = maxMedicalLev; MaxStamina = maxStamina; StaminaRecoveryFrequency = staminaRecoveryFrequency;
            StaminaRecoveryPiece = staminaRecoveryPiece; FaintDrainPerSecond = faintDrainPerSecond; FaintRecoveryPerSecond = faintRecoveryPerSecond;
            MedicalLevDrainPerSecond = medicalLevDrainPerSecond; LifeRecoverPerSecond = lifeRecoverPerSecond;
        }

        // Default
        public Personality() : this(PersonalityType.Lovely, Gender.Female)
        {}

        public Personality (PersonalityType pType, Gender gender)
        {
            Character = pType; CharaGender = gender;

            switch (Character)
            {
                case PersonalityType.Bloody:
                    if (CharaGender == Gender.Male)
                    { SetTraits(1250, 400, 300, 650, 0.5f, 20, 15, 10, 10, 35); }
                    else
                    { SetTraits(1000, 600, 375, 510, 0.8f, 18, 10, 25, 10, 18); }
                    break;

                case PersonalityType.Lovely:
                    if (CharaGender == Gender.Male)
                    { SetTraits(1000, 250, 600, 400, 0.5f, 20, 15, 10, 10, 35); }
                    else
                    { SetTraits(850, 350, 500, 370, 0.4f, 18, 18, 8, 9, 42); }
                    break;

                case PersonalityType.Tsundeere:
                    if (CharaGender == Gender.Male)
                    { SetTraits(975, 375, 400, 710, 0.4f, 23, 11, 9, 8, 10); }
                    else
                    { SetTraits(925,400, 350, 675, 0.3f, 20, 10, 9, 10, 12); }
                    break;
            }

            Life = MaxLife; Faint = MaxFaint; MedicalLev = MaxMedicalLev; Stamina = MaxStamina;
        }
    }
}

using UnityEngine;
using EmotionSystem;

public class TestEmotion : MonoBehaviour
{
    public void Awake()
    {
        var p = new Personality(PersonalityType.Bloody, Gender.Male);
        var q = new Personality();  // Default constructor use
        var r = new Personality(PersonalityType.Tsundeere, Gender.Male);

        DisplayPersonalityTraits(p); DisplayPersonalityTraits(q); DisplayPersonalityTraits(r);
    }

    private void DisplayPersonalityTraits(Personality p)
    {
        Debug.Log("Character is " + p.Character + " " + p.CharaGender.ToString() + " with " + p.Life + " Life (" + p.MaxLife + "), Recover/sec = " + p.LifeRecoverPerSecond);
    }
}

Some general comments, one of them might be your answer. Is the code throwing any errors?

You need a using line to access a namespace, or you can use the full qualified name.

You also need an instance of the class to access non static members.

Your Assign function doesn’t appear to return a Personality.