- Home /
Assigning texture through Inspector will automatically load them?
Hi.
My problem may be easy to solve.
I have 4 big textures that I need to show. They are exactly the same, but in different languages.
My problem is that I was trying to have only 1 variable for all the textures. And when the player change the language, I would load the new texture into the variable.
I am doing like this: instructionsTexture = Resources.Load("text-instructions");
But sometimes (in the device) all I get when changing the language is a black texture. I don't know what seems to be the problem.
What should I do?
Answer by Felipetnh · Aug 14, 2012 at 12:16 AM
scrollPosition =
GUI.BeginScrollView(
Rect (scrollX,scrollY,larguraScroll,alturaScroll), // posicao
scrollPosition, // scroll
Rect (0, 0, larguraScroll-guiSkin.verticalScrollbar.fixedWidth-1, alturaTextGoals) // content
);
GUI.DrawTexture(
Rect(
0,
0,
larguraTextGoals,
alturaTextGoals
),
tex,
ScaleMode.StretchToFill
);
// End the scroll view that we began above.
GUI.EndScrollView ();
Unless you dont set myTexture to whichever texture, im at a loss. Sorry couldnt help anymore.
Try changing the import setting to 1024, hit apply, and test..last thing i can think of.
That works, as I think I said it before. But I can't do that, because of its resolution, I need it in the real resolution for iPad3.
Try switching the format from TrueColor to Compressed and see if that works.
It probably will. But if my textures are compressed I can't read a thing that they say...