유니티 셋팅

This commit is contained in:
2026-03-27 16:34:08 +09:00
parent 474bda26cd
commit d76f078a89
1400 changed files with 116263 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class MB3_DisableHiddenAnimations : MonoBehaviour {
public List<Animation> animationsToCull = new List<Animation>();
void Start () {
if (GetComponent<SkinnedMeshRenderer> () == null) {
Debug.LogError ("The MB3_CullHiddenAnimations script was placed on and object " + name + " which has no SkinnedMeshRenderer attached");
}
}
void OnBecameVisible(){
for (int i = 0; i < animationsToCull.Count; i++) {
if (animationsToCull[i] != null) animationsToCull[i].enabled = true;
}
}
void OnBecameInvisible(){
for (int i = 0; i < animationsToCull.Count; i++) {
if (animationsToCull[i] != null) animationsToCull[i].enabled = false;
}
}
}