Пример #1
0
    void RebuildModel()
    {
        mCurrent.BuildModel();
        // bounds center correction
        SkinnedMeshRenderer sm = mCurrent.GetComponentInChildren <SkinnedMeshRenderer>();

        if (sm != null)
        {
            Bounds newBounds = sm.localBounds;
            newBounds.center = Vector3.zero;
            sm.localBounds   = newBounds;
        }
    }