quick question…
I am trying to create a runtime texture swapper.
Textures are collected into a texture manager, then a second script load a texture based on the pressure of a key.
Texture manager is attached to the main camera and so is the second script.
The second script looks like:
using UnityEngine;
using System.Collections;
public class LT : MonoBehaviour
{
public tex1 = "CS_ExistinSurface_Color";
public tex2 = "WEBFORUMS";
void Update ()
{
if (Input.GetKey ("1"))
{
TextureManager.Get().GetTexture(tex1);
}
if (Input.GetKey ("2"))
{
TextureManager.Get().GetTexture(tex2);
}
}
}
Unfortunately there is a mistake. Where is it?
I am completely lost.
Apologies for the basic question…
G.
[/code]