UnityAPI—MonoBehaviour

public class API06MonoBehaviour : MonoBehaviour {

    public Cube cube;
    // Use this for initialization
    void Start () {
        Debug.Log(this.isActiveAndEnabled);
        Debug.Log(this.enabled);
        enabled = false;
        Debug.Log(name);
        Debug.Log(tag);
        Debug.Log(gameObject);
        Debug.Log(transform);

        print("haha");

        Debug.Log(cube.isActiveAndEnabled);
        Debug.Log(cube.enabled);
        cube.enabled = false;
        Debug.Log(cube.name);
        Debug.Log(cube.tag);
        Debug.Log(cube.gameObject);
        Debug.Log(cube.transform);
    }
    
   

猜你喜欢

转载自blog.csdn.net/qq_42459006/article/details/82078070