| 123456789101112 |
- using UnityEngine;
- public class MapDisplay : MonoBehaviour
- {
- public Renderer textureRenderer;
- public void DrawTexture(Texture2D texture)
- {
- textureRenderer.sharedMaterial.mainTexture = texture;
- textureRenderer.transform.localScale = new Vector3(texture.width, 1, texture.height);
- }
- }
|