// 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; }
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); } }
void Awake() { validator = gameObject.GetComponent <SkinnedMeshesValidator>(); webRtcManager = gameObject.GetComponent <WebRTCManager>(); }