K
K
kbuchin2021-10-17 23:01:28
Unity
kbuchin, 2021-10-17 23:01:28

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

1 answer(s)
A
Alexander Karabanov, 2021-10-17
@karabanov

What is CS0246?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question