- Home /
error CS1525: Unexpected symbol `public'
I get an error.what would I do? Please..
public static NerdGPG Instance() {
if(m_Instance!=null)
return m_Instance;
Debug.Log("NerdGPG instance not found. Creating new one");
GameObject owner = new GameObject("NerdGPG");
m_Instance = owner.AddComponent<NerdGPG>();
DontDestroyOnLoad(m_Instance);
return m_Instance;
}
Comment
Answer by mon_mnn · Apr 22, 2014 at 09:53 PM
If this same error is showing on several spots an not one spot check both spots... if you get it check a above and Below the problem areas new ppl to programming tend to make this mistake or ppl that are rushing their work... go slow and steady if your just learning make sure you did not transpose these keys { } because that can lead to the same error just as forgetting to add those keys
Your answer
Follow this Question
Related Questions
Whats the difference between public and static variable? 2 Answers
protected static in Unity CS? 1 Answer
public static bool not working at all. 0 Answers
Get a public variable to the function. 3 Answers
Why is text ui cant be static ? 0 Answers