title: Upgrade multiplier for clicker game such as Adventure Capitalist
body: <p>Hello community I am making a clicker game but I don't know how to do the upgrade multiplier button such as Adventure Capitalist, I have a single script attached to each GameObject, total of six objects with the same script attached, where I have the Text object which shows a double value which is an array with six indexes, the problem here is that I have the multiplier button object attached with another script, I should do something as static (singleton) because each script has many objects, I only need to access to a single text which is upgrade price displayer crop which is non-static. Pls help me.</p>
  <p>This is the code for the multiplier button</p>
  <pre><code>public class MultiplyManager : MonoBehaviour {
  public void multiply_Crop_PerOne()
  {
      UpgradeButtonCrop.multiplier = 1;
  }
  public void multiply_Crop_PerTen()
  {
      UpgradeButtonCrop.multiplier = 10;
  }
  public void multiply_Crop_PerHundred()
  {
      UpgradeButtonCrop.multiplier = 50;
  }}
  </code></pre>
  <p>And this is the code for the text UI which I am working, what I want to do is make the multiplier button multiply the cost of the upgrade and increase its level, for example if I have an upgrade which costs 1 gold, the multiplier per ten should make that upgrade cost for 10 and increase 10 levels.</p>
  <pre><code>public class UpgradeButtonCrop : MonoBehaviour{
  public static int multiplier;
  public Button upgradeButton_crop;
  public TMP_Text level_displayer_crop;
  public TMP_Text perSec_displayer_crop;
  public TMP_Text upgrade_price_displayer_crop;
  [HideInInspector]
  public double startGoldByUpgrade_crop;
  public double startCurrentCost_crop;
  public double[] crop_upgrade_price_arr = new double[6];
  public int[] level_crop_arr = new int[6];
  
  public void First_Crop_Button()
      {
          purchaseUpgradeCrop(0);
      }
      public void Second_Crop_Button()
      {
          purchaseUpgradeCrop(1);
      }
      public void Third_Crop_Button()
      {
          purchaseUpgradeCrop(2);
      }
      public void Fourth_Crop_Button()
      {
          purchaseUpgradeCrop(3);
      }
      public void Fifth_Crop_Button()
      {
          purchaseUpgradeCrop(4);
      }
      public void Last_Crop_Button()
      {
          purchaseUpgradeCrop(5);
      }
      public void purchaseUpgradeCrop(int index)
      {
          if ((level_crop_arr[index] + multiplier) &lt;= max_level)
          {
                  if (DataController.Instance.gold &gt;= crop_upgrade_price_arr[index] * multiplier)
                  {
                  updateUI_Crop(index);
                  updateUpgrade_Crop();
  
      upgrade_price_displayer_crop.text =  LargeNumber.ToString(crop_upgrade_price_arr[index]).ToString();
                  DataController.Instance.saveUpgradeButton_Crop(this);
                  }
              }
          else
          {
              UpgradeMessageManager.instance.Start_coroutine_cant_upgrade();
              return;
          }
      }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/B1FL0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/B1FL0.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/xC5Og.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xC5Og.png" alt="enter image description here" /></a>
  <a href="https://i.stack.imgur.com/pfvMt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pfvMt.png" alt="enter image description here" /></a></p>