Ok, so this is really embarrassing… I really have no idea why this is happening it never happened before.
I have a simple script that I can attach it to any object and manually adjust values and the name of that type of object. here is the script:
using UnityEngine;
using System.Collections;
public class AmmoBox : MonoBehaviour {
public int ammoAmount = 0;
public string typeOfAmmo = " ";
//-------------------end----------------//
}
Now the issue is, when ever I attach this script to the last object and change its value manually, on engine run time, all other objects that have the same script attach to them, their values change to equal of the last object I added to the games lvl…
I’m NOT updating ammoAmout trough any other script.
Why is this happening?
Is there troubleshoot for this?
I restarted engine and scripts thinking its some kind of a bug, I get the same results.
But even crazier thing is that this script worked just fine for moths, no issues until today.