Null Reference Exception

when i want creating
i got Null[17422-false+3.jpg|17422]

using UnityEngine;
using System.Collections;
using System;				//used for the Enum Class

public class ChacaterGenerator : MonoBehaviour {
	private PlayerCharacter _toon;
	private const int STARTING_POINTS = 350;
	private const int MIN_STARTING_ATTRIBUTE_VALUE = 10;
	private const int STARTING_VALUE = 50;
	private int poinLeft;
	
	private const int OFFSET = 5;
	private const int LINE_HEIGHT = 20;
	
	private const int STAT_LABEL_WIDTH = 100;
	private const int BASEVALUE_LABEL_WIDTH = 30;
	private const int BUTTON_WIDTH = 20;
	private const int BUTTON_HEIGHT = 20;
	
	private int statStartingPos = 40;
	
	public GUIStyle myStyle;
	
	public GameObject playerPrefabs;
	
	// Use this for initialization
	void Start () {
		GameObject pc = Instantiate(playerPrefabs, Vector3.zero, Quaternion.identity) as GameObject;
		
		pc.name = "pc";
		
		_toon = pc.GetComponent<PlayerCharacter>();

		
		poinLeft = STARTING_POINTS;
		
		for(int cnt = 0; cnt < Enum.GetValues(typeof(AttributName)).Length; cnt++){
			_toon.GetPrimaryAttribute(cnt).BaseValue = STARTING_VALUE;
			poinLeft -= (STARTING_VALUE - MIN_STARTING_ATTRIBUTE_VALUE);
		}
		
		_toon.StatUpdate();		
	}
	
	void Update () {		
	}
	
	void OnGUI() {
		DisplayName();
		DisplayPointsleft();
		DisplayAttributes();
		DisplayVitals();
		DisplaySkills();
		
		if(_toon.Name == "" || poinLeft > 0 )
			DisplayCreateLabel();
		else
			DisplayCreateButton();
		
	}
	
	private void DisplayName() {
		GUI.Label(new Rect(10, 10, 50, 25), "Name:");
		_toon.Name = GUI.TextField(new Rect(65, 10, 100, 25), _toon.Name);
	}
	
	private void DisplayAttributes() {
		for(int cnt = 0; cnt < Enum.GetValues(typeof(AttributName)).Length; cnt++){
			GUI.Label(new Rect( OFFSET,
								statStartingPos + (cnt * LINE_HEIGHT),
								STAT_LABEL_WIDTH, 
								LINE_HEIGHT
					), ((AttributName)cnt).ToString());
			
			GUI.Label(new Rect( STAT_LABEL_WIDTH + OFFSET, 
								statStartingPos + (cnt * LINE_HEIGHT), 
								BASEVALUE_LABEL_WIDTH, 
								LINE_HEIGHT
					), _toon.GetPrimaryAttribute(cnt).AdjustedBaseValue.ToString());
			
			if(GUI.Button(new Rect( OFFSET + STAT_LABEL_WIDTH + BASEVALUE_LABEL_WIDTH, 
									statStartingPos + (cnt * BUTTON_HEIGHT), 
									BUTTON_WIDTH, 
									BUTTON_HEIGHT
						), "-")){
				if(_toon.GetPrimaryAttribute(cnt).BaseValue > MIN_STARTING_ATTRIBUTE_VALUE){
					_toon.GetPrimaryAttribute(cnt).BaseValue--;
					poinLeft++;
					_toon.StatUpdate();
				}
			}
			if(GUI.Button(new Rect( OFFSET + STAT_LABEL_WIDTH + BASEVALUE_LABEL_WIDTH + BUTTON_WIDTH, 
									statStartingPos + (cnt * BUTTON_HEIGHT), 
									BUTTON_WIDTH, 
									BUTTON_HEIGHT
							), "+")){
				
				if(poinLeft > 0) {
					_toon.GetPrimaryAttribute(cnt).BaseValue++;
					poinLeft--;
					_toon.StatUpdate();
				}
			}
		}
	}
	
	private void DisplayVitals() {
		for(int cnt = 0; cnt < Enum.GetValues(typeof(VitalName)).Length; cnt++) {
			GUI.Label(new Rect( OFFSET, 
								statStartingPos + ((cnt +7) * LINE_HEIGHT), 
								STAT_LABEL_WIDTH, 
								LINE_HEIGHT
					), ((VitalName)cnt).ToString());
			
			GUI.Label(new Rect( OFFSET + STAT_LABEL_WIDTH, 
								statStartingPos + ((cnt +7) * LINE_HEIGHT), 
								BASEVALUE_LABEL_WIDTH, LINE_HEIGHT
					), _toon.GetVital(cnt).AdjustedBaseValue.ToString());
		}
	}
	
	private void DisplaySkills() {
		for(int cnt = 0; cnt < Enum.GetValues(typeof(SkillName)).Length; cnt++) {
			GUI.Label(new Rect( OFFSET + STAT_LABEL_WIDTH + BASEVALUE_LABEL_WIDTH + BUTTON_WIDTH * 2 + OFFSET * 2 , 
								statStartingPos + (cnt * LINE_HEIGHT), 
								STAT_LABEL_WIDTH, 
								LINE_HEIGHT
					), ((SkillName)cnt).ToString());
			
			GUI.Label(new Rect( OFFSET + STAT_LABEL_WIDTH + BASEVALUE_LABEL_WIDTH + BUTTON_WIDTH * 2 + OFFSET * 2 + STAT_LABEL_WIDTH, 
								statStartingPos + (cnt * LINE_HEIGHT), 
								BASEVALUE_LABEL_WIDTH, 
								LINE_HEIGHT
								), _toon.GetSkill(cnt).AdjustedBaseValue.ToString());
		}
	}
	
	private void DisplayPointsleft() {
		GUI.Label(new Rect(250, 10, 100, 25), "Points Left: " + poinLeft.ToString());
	}
	private void DisplayCreateLabel() {
		GUI.Label(new Rect( Screen.width/ 2 - 50, statStartingPos + (10 * LINE_HEIGHT), 100, LINE_HEIGHT), "Creating...", "Button");
	}

	
	private void DisplayCreateButton() {
		if(GUI.Button(new Rect( Screen.width/ 2 - 50, statStartingPos + (10 * LINE_HEIGHT), 100, LINE_HEIGHT), "Create")) {
			GameSettings gsScript = GameObject.Find("_ _GameSettings").GetComponent<GameSettings>();
				
			//change the cur value of the vitals to the max modified value of that vital
			UpdateCurVitalValues();
			
			//save the character data
			gsScript.SaveCharacterData();
			
			Application.LoadLevel(1);
		}
	}	
	private void UpdateCurVitalValues(){
		for(int cnt = 0; cnt < Enum.GetValues(typeof(VitalName)).Length; cnt++){
			_toon.GetVital(cnt).CurValue = _toon.GetVital(cnt).AdjustedBaseValue;
		}
	}
}

Short answer is that it either can’t find the “_ _GameSettings” object or the object doesn’t have a GameSettings script on it.

Try changing:

     GameSettings gsScript = GameObject.Find("_ _GameSettings").GetComponent<GameSettings>();

to:

         GameObject gsObject = GameObject.Find("_ _GameSettings");
         if( !gsObject ){
             Debug.LogError("No Object called _ _GameSettings!");
             return;
         }

         GameSettings gsScript = gsObject.GetComponent<GameSettings>();
         if( !gsScript ){
             Debug.LogError("No GameSettings script on _ _GameSettings object!");
             return;
         }

And that should give you a bit of info on where your problem lies.

If your problem is that there is not _ _GameSettings object try changing the name of the _ _GameSettings object to just _GameSettings in case unity doesn’t like it.