Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code snippet to automatically set UV Edge to true
#1
Hi

With Curvy Splines 8, multiple issues with the extended UV coordinates, set via the Meta CG Options script. All those issues are listed in the release notes.
One of these issues is:
[FIXED] When there is a change of Material ID at a specific CP, its "UV Edge" is overridden to true

For those relaying on that old behavior, you will have to set "UV Edge" to true for all the CPs with a change of Material ID.

Her is a code snippet that does that here:
Code:
        foreach (CurvySplineSegment cp in spline.ControlPointsList)
        {
            var metaCgOptions =  cp.GetMetadata<MetaCGOptions>();
            if (metaCgOptions)
            {
                if (metaCgOptions.HasDifferentMaterial)
                    metaCgOptions.UVEdge = true;
            }
        }
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Follow-Up are automatically changed to be "No Follow-Up" Chanon 2 13 06-19-2022, 04:24 AM
Last Post: Chanon
  Import/Export, Spline from code Mos Def 4 782 02-14-2022, 11:42 AM
Last Post: _Aka_
  Updating old movement code Maltakreuz 3 2,341 08-18-2020, 04:49 PM
Last Post: _Aka_
  Creting SplineControllers thru code generating errors curvyuser007 7 3,825 06-07-2020, 04:19 PM
Last Post: curvyuser007

Forum Jump: