ive seen many answers and tried everything like changing the name of the script , moving the script tosome other folder , e.t.c.
Please suggest something else.
im new to c# scripting thats why I was trying one of those 2D Roguelike tutorials.
my error is somewhat like this-
Assets/Scripts/GameManager.cs(8,22): error CS0101: The namespace global::' already contains a definition for
GameManager’
my code is somewhat like this-
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class GameManager : MonoBehaviour
{
public static GameManager instance = null;
private BoardManager boardScript;
private int level = 3;
void Awake()
{
if (instance == null)
instance = this;
else if (instance != this)
Destroy(gameObject);
DontDestroyOnLoad(gameObject);
boardScript = GetComponent<BoardManager>();
InitGame();
}
void InitGame()
{
boardScript.SetupScene(level);
}
void Update()
{
}
}
People please help!