Textures

Since version 1.2 Curve Line Renderer supports textures. Now you can build roads, border lines and others.

To implement textures into project you need follow next simple steps:

  1. Create GameObject with attached CurveLineRenderer script;
  2. Create Material (or edit a material from sample);
  3. Import texture image;
  4. Attach a texture to material.
Note: you must orient texture image so that up and bottom sides can be connected.

Important: to use into the CurveLineRenderer script texture should have Repeat wrap mode. 
Script send message to Warning Log if wrap mode of main texture isn't Repeat.



Sample of texturing for CurveLineRenderer script



Fig. 1. Texture image with parameters into Inspector


Result images:

Fig. 2. Road with default mode of line

Fig. 3. Rounded road with low detail mesh

Fig. 4. Rounded road with middle detail mesh

Fig. 4. Rounded road with high detail mesh






Комментариев нет:

Отправить комментарий