Change scene using text UI ? help

107188-q1.png
107190-q4.png

I want to change scene by the content of Text UI when I press Start

I add my C# script to Main Camera and give Text to C# script

and call changemenuscene when I press button

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class Changescene : MonoBehaviour {

	public Text Scenename;
	public void changemenuscene ()
	{
		//Debug.Log("Hi");
		Debug.Log (Scenename.text);
		Debug.Log (SceneManager.GetActiveScene ().buildIndex);
		//SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
		if (Scenename.text == "Dog") {
			Debug.Log ("Dogg");
			//Application.LoadLevel (1);
			SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
		} 
		else if (Scenename.text == "Cat") {
			Debug.Log ("cat");
			//Application.LoadLevel (0);
			SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 2);
		}
	}
}

Debug.Log

Dog

UnityEngine.Debug:Log(Object)

Changescene:changemenuscene() (at Assets/Changescene.cs:13)

UnityEngine.EventSystems.EventSystem:Update()

0
UnityEngine.Debug:Log(Object)

Changescene:changemenuscene() (at Assets/Changescene.cs:14)

UnityEngine.EventSystems.EventSystem:Update()

in the yellow square fail to use if and else if, and I don’t know how to solve this problem

thanks for your time to help

Correct version

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class Changescene : MonoBehaviour {

	public Text Scenename;
	string String1 = "Dog" ;
	string String2 = "Cat";
	public void changemenuscene ()
	{
		//Debug.Log("Hi");
		Debug.Log (Scenename.text);
		Debug.Log (SceneManager.GetActiveScene ().buildIndex);
		//SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
		if( string.Compare(Scenename.text.Trim(),String1)==0 ) {
			Debug.Log ("Dog");
			//Application.LoadLevel (1);
			SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
		} 
		else  if( string.Compare(Scenename.text.Trim(),String2)==0) {
			Debug.Log ("cat");
			//Application.LoadLevel (0);
			SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 2);
		}
	}
}