shame

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]

What do you mean by “there is a mistake” - compile error, compiles but just doesn’t work, etc?

yes, it does not compile…
but also I realized it does nothing.
Will post more later
thanks!
g,

:sweat_smile:

public text1=" …";

Probably you missed the type declaration.

Try public String text1=" … ";