unity高亮鼠标点击3D物体(使用highlighting

void Update()

{

if(flag==true)

{

Debug.Log("tween = true");

transform.GetComponent().tween = true;

}

else transform.GetComponent().tween = false;

}

public void OnMouseDown()

{

flag = true;

Debug.Log("MouseDown");

}

public void OnMouseExit()

{

flag = false;

}

你可能感兴趣的:(unity)