Answer the question
In order to leave comments, you need to log in
I made a game on a unit and gave an error cs0246 how to fix it?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class MainMenu : MonoBehavior
{
[SerializeField] int money;
public Text moneyText;
private void Start()
{
money = PlayerPrefs.GetInt("money");
}
public void ButtonClick()
{
money++;
PlayerPrefs.SetInt("money", money);
}
public void ToAchievements()
{
SceneManager.LoadScene(1);
}
//Update is called once per frame
void Update()
{
moneyText.text = money.ToString();
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question