test : opti

This commit is contained in:
Ferlat Thibaud
2026-07-03 11:49:25 +02:00
parent 85ab8ebabd
commit fea082bb6f
399 changed files with 1912806 additions and 1893 deletions
@@ -0,0 +1,26 @@
using UnityEngine;
using System.Collections;
using DigitalOpus.MB.Core;
public class MB2_UpdateSkinnedMeshBoundsFromBones : MonoBehaviour {
SkinnedMeshRenderer smr;
Transform[] bones;
void Start () {
smr = GetComponent<SkinnedMeshRenderer>();
if (smr == null){
Debug.LogError("Need to attach MB2_UpdateSkinnedMeshBoundsFromBones script to an object with a SkinnedMeshRenderer component attached.");
return;
}
bones = smr.bones;
bool origVal = smr.updateWhenOffscreen;
smr.updateWhenOffscreen = true;
smr.updateWhenOffscreen = origVal;
}
void Update () {
if (smr != null){
MB3_MeshCombiner.UpdateSkinnedMeshApproximateBoundsFromBonesStatic(bones,smr);
}
}
}