// Use this for initialization void Start () { _slots = GetComponentInParent<OrganSlots>(); _renders = GetComponentsInChildren<MeshRenderer>(); if (_renders == null) return; foreach (MeshRenderer mr in _renders) { foreach (Material mat in mr.materials) { _defaultMats.Add(mat); } } }
// Use this for initialization void Start () { _organSlots = GetComponentInParent<OrganSlots>(); }