x


Primitive block texturing (In code) HELP

for some reason i cannot change the texture of my primitive cubes CODE:

for (var y = -30; y < 5; ++y)
for (var x = -30; x < 5; ++x) {
    var cube : GameObject = GameObject.CreatePrimitive (PrimitiveType.Cube);
    cube.transform.position = transform.position + Vector3(x, 0, y);
    cube.renderer.material.mainTexture ("dirt.png");

}
more ▼

asked Feb 04 '12 at 06:08 PM

buildman99 gravatar image

buildman99
16 6 7 8

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2279
x2058
x841
x43
x17

asked: Feb 04 '12 at 06:08 PM

Seen: 613 times

Last Updated: Feb 04 '12 at 09:48 PM