Ejemplo n.º 1
0
    void CreateScaffold()
    {
        if (scaffold != null)
        {
            return;
        }

        var mu = GetComponent <MapUnit>();

        scaffoldUID = mu.U.UID + "_Scaffold";
        scaffold    = UC.CreateModel("Scaffold", scaffoldUID, false, false);
        UC.UnhandleModel(scaffoldUID); // 脚手架模型是动画的一部分,交给动画自己管理
        scaffold.transform.SetParent(transform, false);
        scaffold.transform.localPosition = Vector3.zero;
        scaffold.transform.localScale    = Vector3.one;
        scaffold.transform.localRotation = Quaternion.identity;
        scaffold.gameObject.SetActive(true);
    }