Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Spline Custom Flat-Shaded Square Extrude Script

DamastDamast Member
edited September 26 in Programming

Hello everyone,

I'm creating a custom **Spline Extrude** script in Unity to generate square spline meshes using Unity's spline package. I've made good progress with flat shading and added rotation offset functionality. However, I'm facing an issue:

**Issue:**

I want the sides along the spline path to be **smooth-shaded** (yellow areas in the image below), while keeping the circumference edges **flat-shaded** to maintain the square look (blue edges). Currently, all sides are flat-shaded in my implementation.

My ultimate goal is to have a Spline Extrude script that is more flexible than Unity's default, allowing users to select which axes should be shaded flat or smooth.

**What I've Done So Far (using the default Spline Extrude script as a base):**

* Implemented flat shading for the mesh.

* Added rotation offset functionality.

Any help or direction would be greatly appreciated!

Code: https://pastebin.com/6Yq6AeBb

Sign In or Register to comment.