public class Forward : MonoBehaviour
{
public int Google { get; private set; }
}
public class Component : MonoBehaviour
{
[SerializeField] private Forward _firstComponent;
private void Sample()
{
Debug.Log(_firstComponent.Google);
}
}
Returns the value corresponding to key in the preference file if it exists.
Ты НЕ ИЗМЕНЯЕШЬ ShopAssist.money. У тебя в ShopAssist есть метод TryRemoveMoney используй его, чтобы отнять деньги. В твоем случае это будет script1.TryRemoveMoney(количество).