Skip to content

Conversation

@sindharta
Copy link
Collaborator

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the transparent mode setup logic to consolidate two separate methods (SetupOutline and SetupOverDrawTransparentObject) into a single parameterized method (SetupTransparentMode). This reduces code duplication and improves maintainability by centralizing the logic for handling transparent vs non-transparent rendering modes.

Key Changes

  • Consolidated SetupOutline and SetupOverDrawTransparentObject into a single SetupTransparentMode method
  • Updated call sites in both UTS3GUI.cs and BuiltInUTS2toIntegratedConverter.cs to use the new unified method

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
com.unity.toonshader/Editor/UTS3GUI.cs Replaced conditional calls to separate setup methods with a single parameterized method call; merged two setup methods into one
com.unity.toonshader/Editor/Converter/FromUTS2/BuiltInUTS2toIntegratedConverter.cs Updated converter to use the new unified setup method and removed conditional setup logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

return;

const string srpDefaultColorMask = "_SPRDefaultUnlitColorMask";
const string srpDefaultCullMode = "_SRPDefaultUnlitColMode";
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constant name srpDefaultCullMode contains 'Col' which appears to be a typo for 'Cull'. This should be renamed to _SRPDefaultUnlitCullMode for clarity and consistency with Unity naming conventions.

Suggested change
const string srpDefaultCullMode = "_SRPDefaultUnlitColMode";
const string srpDefaultCullMode = "_SRPDefaultUnlitCullMode";

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants