Esempio n. 1
0
        public static List <MeshRenderer> SearchMeshContainer(this GameObject[] input)
        {
            List <MeshRenderer> temp = new List <MeshRenderer>( );

            foreach (var i in input)
            {
                var tempChild = ObjHelper.FindMeshRenderer(i);
                foreach (var c in tempChild)
                {
                    temp.Add(c);
                }
            }

            return(temp);
        }
        public void SetMeshContainer(string tagName)
        {
            GameObject[] tempObjs = GameObject.FindGameObjectsWithTag(tagName);

            _storedMeshes.Clear( );
            List <MeshRenderer> added = new List <MeshRenderer>( );

            foreach (var o in tempObjs)
            {
                added = ObjHelper.FindMeshRenderer(o);

                foreach (var m in added)
                {
                    _storedMeshes.Add(m);
                }
            }
        }