Exemplo n.º 1
0
        /// <summary>
        /// 应用渲染信息
        /// </summary>
        /// <param name="rendererInfos"></param>
        /// <param name="offsetIndexs"></param>
        private static void applyRendererInfo(RendererInfo[] rendererInfos, int[] offsetIndexs)
        {
            for (int i = 0; i < rendererInfos.Length; i++)
            {
                RendererInfo info = rendererInfos[i];

                info.renderer.lightmapIndex       = offsetIndexs[info.LightmapIndex];
                info.renderer.lightmapScaleOffset = info.LightmapOffsetScale;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 应用渲染信息
 /// </summary>
 /// <param name="rendererInfos"></param>
 /// <param name="offsetIndexs"></param>
 private static void applyRendererInfo(RendererInfo[] rendererInfos, int[] offsetIndexs)
 {
     for (int i = 0; i < rendererInfos.Length; i++)
     {
         RendererInfo info = rendererInfos[i];
         //Debug.Log("origin idx:" + info.LightmapIndex + ",offset index length:" + offsetIndexs.Length);
         info.renderer.lightmapIndex       = offsetIndexs[info.LightmapIndex];
         info.renderer.lightmapScaleOffset = info.LightmapOffsetScale;
     }
 }