24-09-2021, 09:18 AM
(This post was last modified: 24-09-2021, 09:19 AM by josemendez.)
(23-09-2021, 10:35 PM)Churger Wrote: josemendez Is there a way for the rope that your script generates to have a material. I have been trying to generate a rope between two transforms during runtime preferably with a prefab but I haven't had any luck.
Hi,
Of course. The rope is just an object like any other, so you do this the same way you do for any object in Unity: access the renderer and set the material.
Code:
rope.GetComponent<MeshRenderer>().material = <your material>