Created
June 29, 2019 17:57
-
-
Save leegoonz/4470e306c9f583585e944b3f4969d45b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class FixLightMapTiling : MonoBehaviour { | |
public GameObject _getLightmapScaleObj; | |
public GameObject _setLightmapScaleObj; | |
public Vector4 _lightmapScalOffset; | |
public int _lightmapIndex; | |
void OnDrawGizmos() | |
{ | |
Renderer Lod0 = _getLightmapScaleObj.GetComponent<Renderer>(); | |
Renderer LodChild = _setLightmapScaleObj.GetComponent<Renderer>(); | |
_lightmapIndex = Lod0.lightmapIndex; | |
_lightmapScalOffset = Lod0.lightmapScaleOffset; | |
LodChild.lightmapIndex = _lightmapIndex; | |
//Debug.Log(LodChild.lightmapIndex); | |
LodChild.lightmapScaleOffset = _lightmapScalOffset; | |
//Debug.Log(LodChild.lightmapScaleOffset); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment