symbol “” mean type string, so you just need to remove it. it will work!
using UnityEngine;
using System.Collections;
public class mouseTrigger1 : MonoBehaviour
{
public Animator myAnimator;
public bool myBool = true; //recommend adding initial value
void Start()
{
myAnimator = GetComponent<Animator>();
}
void OnMouseUp()
{
Debug.Log("M.U.");
myBool = !myBool;
myAnimator.applyRootMotion = myBool; // change here to make your script short and clear
if (myBool)
{
Debug.Log("if is false");
}
else
{
Debug.Log("else");
}
}
}
I am not sure what kind of stuff you want to change,
so I use applyRootMotion to be example.
Assets/Scripts/mouseTrigger1.cs(10,17): error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
&
if (myBool == false) {
myAnimator.SetBool(myBool, true);
Assets/Scripts/mouseTrigger1.cs(17,36): error CS1502: The best overloaded method match for `UnityEngine.Animator.SetBool(string, bool)’ has some invalid arguments