RayCastColliders.cs 321 B

12345678910111213141516
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class RayCastColliders : MonoBehaviour
  5. {
  6. public MeshRenderer[] meshs;
  7. public void SetMeshEnable(bool flag)
  8. {
  9. for (int i = 0; i < meshs.Length; i++)
  10. {
  11. meshs[i].enabled = flag;
  12. }
  13. }
  14. }