Пример #1
0
 // Use this for initialization
 void Awake()
 {
     validator     = gameObject.GetComponent <SkinnedMeshesValidator>();
     webRtcManager = gameObject.GetComponent <WebRTCManager>();
     tiling        = Resources.Load("TilingShader") as ComputeShader;
     diff          = Resources.Load("DiffShader") as ComputeShader;
 }
Пример #2
0
 public static void SetTexturesWriteFlags(GameObject obj, bool flag)
 {
     if (obj != null)
     {
         List <SkinnedMeshRenderer> smrs  = new List <SkinnedMeshRenderer>();
         SkinnedMeshRenderer[]      psmrs = obj.GetComponents <SkinnedMeshRenderer>();
         SkinnedMeshRenderer[]      csmrs = obj.GetComponentsInChildren <SkinnedMeshRenderer>();
         if (psmrs.Length != 0)
         {
             smrs.AddRange(psmrs);
         }
         if (csmrs.Length != 0)
         {
             smrs.AddRange(csmrs);
         }
         SkinnedMeshesValidator.SetTexturesWriteFlags(smrs.ToArray(), flag);
     }
 }
Пример #3
0
 void Awake()
 {
     validator     = gameObject.GetComponent <SkinnedMeshesValidator>();
     webRtcManager = gameObject.GetComponent <WebRTCManager>();
 }