Not allowed to access Renderer.materials on prefab object. Use Renderer.sharedMaterials insteadUnityEngine.Renderer:get_materials() 如果是Resource.Load的预制件,在代码中用.materials访问会报上述错,要new一份再使用,即 GameObject.Instantiate (res) as GameObject;…
JS中的 map, filter, some, every, forEach, for in, for of 用法总结和区别 :https://blog.csdn.net/hyupeng1006/article/details/79877710 本文链接:https://blog.csdn.net/hyupeng1006/article/details/79877710函数简述:map():返回一个新的Array,每个元素为调用func的结果filter():返回符合func条件的元素数组fi…