I change UV scale by this piece of code:
But it doesn't take place. What should I do ?
Right now it happens in runtime. What should I do if I want to happens in edit time ? Just by putting [ExecuteInEditMode] or I should do anything else ?
Edit: I think it is done by calling Refresh of BuildVolumeMesh module. Am I right ?
Edit 2: I try to have same texture size on all of my splines but I can't achieve it by changing Y UV, I assume 1 amount of Y UV for, for instance 200 length and then by dividing spline length by 200 and assigning to Y UV Scale, I can't achieve what I want.
The code:What should I do ?
https://gyazo.com/306799228567b33b5c48039a319c4857
Code:
_buildVolumeMesh.MaterialSetttings[0].UVScale.y = _buildVolumeMesh.InVolume.GetData<CGVolume>().Length / 200
But it doesn't take place. What should I do ?
Right now it happens in runtime. What should I do if I want to happens in edit time ? Just by putting [ExecuteInEditMode] or I should do anything else ?
Edit: I think it is done by calling Refresh of BuildVolumeMesh module. Am I right ?
Edit 2: I try to have same texture size on all of my splines but I can't achieve it by changing Y UV, I assume 1 amount of Y UV for, for instance 200 length and then by dividing spline length by 200 and assigning to Y UV Scale, I can't achieve what I want.
The code:
Code:
_buildVolumeMesh.MaterialSetttings[0].UVScale.y = _buildVolumeMesh.InVolume.GetData<CGVolume>().Length / 200
https://gyazo.com/306799228567b33b5c48039a319c4857