He I have just tried to code and I am running into a issue.
Assets/Side Button/Sliders.cs(25,21): error CS0161: `Sliders.button11()': not all code paths return a value
My code is as follows:
public bool button11(){
personalprofile.SetActive (true);
worked.SetActive (false);
design.SetActive (false);
producer.SetActive (false);
developer.SetActive (false);
aditionalinfo.SetActive (false);
}
Methods have a return value. Writing a method
– maccabbepublic bool button11()is telling the machine that you have a public method called button11 that returns a bool. However you are not returning a value so your compiler is confused why you told it to expect a bool. Either change the return type to void, i.e. public void button11(){ or return a value in the method, i.e. return false; https://msdn.microsoft.com/en-us/library/ms173114.aspx