0
using UnityEngine;
using System.Collections;
public class Lift : MonoBehaviour {
private bool pressedButton = false;
private bool isElevatorUp = false;
public GameObject target;
void OnMouseOver()
{
pressedButton = true;
}
void OnMouseExit()
{
pressedButton = false;
}
void OnMouseDown()
{
if(isElevatorUp == false)
{
target = GameObject.Find("Elevator");
}
}
void OnGUI()
{
if(pressedButton == true)
{
GUI.Box(new Rect(300, 300, 200, 20), "Press to use lift!");
}
}
}
私はtarget.animationと入力します。 最後のポイントの後、いくつかのプロパティが表示されますが、再生されません。GameObject.animationにplayプロパティがないのはなぜですか?
これは:target.animation.Playである必要がありますが、Playは存在しません。
実際にGameObject.animationプロパティは廃止されました – luizcarlosfx