private void Start() { raycaster = GlobalObject.Get <TerrainRaycaster>(); labelRenderer = GlobalObject.Get <LabelRenderer>(); terrain = GlobalObject.Get <TerrainManager>(); mainCam = GetComponentInChildren <Camera>(); Yrotation = transform.rotation.eulerAngles.x; }
public void Initialize() { texCoords = new Rect[6]; var tm = GlobalObject.Get <BlockTextureManager>(); if (textures != null) { for (int i = 0; i < 6; i++) { texCoords[i] = tm.FindBlockTexture(textures[i]); } } else { Rect r = string.IsNullOrEmpty(texture) ? tm.ErrorBlockTexture : tm.FindBlockTexture(texture); for (int i = 0; i < 6; i++) { texCoords[i] = r; } } }