|
This is what I tried. Successfully generated a 10x10 grid of tiles. The tiles are coming out textureless, however. Help!!!
(comments are locked)
|
|
Okay, I got it working by setting the first material instead of trying to do the second. Here's the code:
After I got that working, I was messing around with the code to highlight tiles. Here's that code:
Why does this code work and trying to assign a material this way does not?
(comments are locked)
|
|
A couple things; one, you're trying to change renderer.materials on the actual prefab, instead of the instance. Instead do this:
Two, renderer.materials doesn't work that way. It's likely you meant renderer.material anyway, but in case you actually are using multiple materials per tile, then you need to do something like Ah, okay, thanks. The script reference was really vague on the material part.
May 14 '11 at 03:58 PM
JuggmasterZero
(comments are locked)
|
