源战役客户端
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

25 строки
772 B

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using LuaFramework;
public class MB3_DisableHiddenAnimations : MonoBehaviour {
public List<Animation> animationsToCull = new List<Animation>();
void Start () {
if (GetComponent<SkinnedMeshRenderer> () == null) {
LogManager.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;
}
}
}