예제 #1
0
    void FixedUpdate()
    {
        if (lastModelForColliders != null)
        {
            int  inc = 5;
            bool b   = true;
            // print("LastIso: " + lastModelForColliders.isoCenter);
            // if (antiBakeCounter > 0) {
            // antiBakeCounter--;
            // return;
            // }

            if (lastModelForColliders.isoCenter != null)
            {
                b = AddColliders(lastModelForColliders, lastModelForCollidersCounter, inc);
                antiBakeCounter = antiBakeMax;
                lastModelForCollidersCounter += inc;
            }

            if (!b)
            {
                return;
            }
            lastModelForColliders.top.SetActive(true);
            // antiBakeCounter = 0;
            // UnityEngine.Debug.LogError("ISO TEST");
            // return;
            MeshMaker.FixPositions(lastModelForColliders.dimensions, lastModelForColliders.top);
            rotate = lastModelForColliders.top.transform;
            uic.UpdateUI();
            // sw.Stop();
            // printStopwatch(sw, "Update Model: ");
            loadingModelName             = "";
            loadingModel                 = false;
            loadingModelChange           = true;
            lastModelForColliders        = null;
            lastModelForCollidersCounter = 0;
            // UnityEngine.Debug.LogError("ISO TEST");
        }
    }