Monobehaviour does not work properly

I have been working on a project for a while. At the beginning there wasn’t any problem but by the last few days Start functions of some scripts does not work properly automaticly. Now i have to start it manually. What can be the reason?

Beside this there can be some allocation problems. Some of my arrays doesn’t contain the right values but there is nothing modifying them so there shouldn’t be a problem like this.

As programming language i am using c#.

Can the reason be binary merging of binary files. Because we are two programmers and using SVN for source control

Welcome to the forum!

Can you post one of the scripts that is giving you problems?

Thanks, below there is one of my scripts. It’s purpose is to manage game logic. It instantiates OuterCubePrefab in single player mode, but after this in spite of calling start function, it does not. So i had to call it manually.

		gameState = StartingState;

		timer = new GameTimer();

		if (GameProperties.Mode == GameProperties.GameMode.Multi_Player)
		{
			if(Network.isServer)
			{
				timer.AlarmInterval = ((int)GameProperties.Speed + 1) * 15;
				timer.GivenTimerElapsed += SwitchPlayer;
												
				Player.GetPlayer(Network.player).OuterCube = Network.Instantiate(OuterCubePrefab, new Vector3(200, 0, 0), Quaternion.identity, 0) as GameObject;
			}
			else
			{
				Player.GetPlayer(Network.player).OuterCube = Network.Instantiate(OuterCubePrefab, new Vector3(-200, 0, 0), Quaternion.identity, 0) as GameObject;
			}
			
			NetworkScript.ChangeActivePlayer();
			cameraLookingTo = Player.ActivePlayer;

			cameraPositions = new Vector3[2];
			cameraPositions[1] = Camera.main.transform.position - new Vector3(200, 0, 0);
			cameraPositions[0] = Camera.main.transform.position + new Vector3(200, 0, 0);

			Camera.main.transform.position = cameraPositions[0];
		}
		else
		{
			ScoreReaderWriter.CacheScores();
			Player.CreatePlayer("Name");
			Player.ActivePlayer = Player.Players[0];
			cameraLookingTo = Player.ActivePlayer;
			GameObject obj = (GameObject) GameObject.Instantiate(OuterCubePrefab, new Vector3(0, 0, 0), Quaternion.identity);
			obj.name = "PlayerCube0";
			OuterCubeScript cubeScript = obj.GetComponent("OuterCubeScript") as OuterCubeScript;
			cubeScript.Start();
			cubeScript.InitializeAxes();
			cubeScript.CreateColumns();
			Player.ActivePlayer.OuterCube = obj;
		}

I have been just solved the problem. I think start function does not invoked at the instantiating time. Am i right?

Correct.

MonoBehaviour.Awake() is called when the object is insantiated.
MonoBehaviour.Start() is called just before the first Update() is called.