Answer the question
In order to leave comments, you need to log in
Error in unit Type or namespace definition, or end-of-file expected?
ssets\Scripts\Main1.cs(52,1): error CS1022: Type or namespace definition, or end-of-file expected
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Main : MonoBehaviour
{
public Text ecocoinsText;
public Text moneyText;
public int ecocoins;
public int money;
public GameObject settingsPan;
public GameObject music;
public GameObject MusicButton;
public Text MusicButtonText;
public GameObject shopPan;
public GameObject exchPan;
public void shopPan_SH()
{
shopPan.SetActive(!shopPan.activeSelf);
}
public void exchPan_SH()
{
exchPan.SetActive(!exchPan.activeSelf);
}
public void settingsPan_SH()
{
settingsPan.SetActive(!settingsPan.activeSelf);
}
public void ButtonClicked()
{
ecocoins += 1;
ecocoinsText.text = "EcoCoins: " + ecocoins;
moneyText.text = "Money: " + money;
}
public void MusicButtonCl()
{
music.SetActive(!music.activeSelf);
MusicButtonText.text = "Музыка: ОТКЛ";
if(music.activeSelf)
{
MusicButtonText.text = "Музыка: ВКЛ";
}
}
}
Answer the question
In order to leave comments, you need to log in
Here's something that's clearly stated crookedly.
It must have been methods.
public void shopPan_SH
{
shopPan.SetActive(!shopPan.activeSelf);
}
public void exchPan_SH
{
exchPan.SetActive(!exchPan.activeSelf);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question