Skip to content

Prepare: read collision-node materials before renderer removal - #398

Draft
SashaRX wants to merge 1 commit into
mainfrom
codex/surface-binding-integration
Draft

SashaRX wants to merge 1 commit into
mainfrom
codex/surface-binding-integration

Conversation

@SashaRX

@SashaRX SashaRX commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Problem and change

A collision node such as Seat_COL with its own M_Wood_Oak material and no matching render sibling received no surface binding. The Colliders step only inspected render siblings, and Apply removed the collision renderer before resolving its surface.

Read surface evidence before renderer removal and inspect the node's own materials before matched render siblings. Explicit surface words in the part name still take priority. No game types, assembly dependencies, serialized settings or binding interfaces are added.

Verification

  • Added 9 EditMode test cases for own-material Preview/Apply parity (root and non-root placement), name/material/fallback precedence, preservation of an existing different reference, missing-asset retry on a non-root collider, incompatible data types, and real AssetDatabase lookup with prefab-variant reload.
  • Extended the resolver test to document first-recognized-material behavior.
  • Both compile-check FBX variants compile against Unity reference assemblies: 0 warnings, 0 errors. Used single-node MSBuild with build servers disabled due to the execution environment.
  • Identifier check: 0 findings; tool dependency check: 0 violations; metadata and whitespace checks passed.
  • Unity Editor is unavailable here, so EditMode tests have been added and compiled but not executed. This PR remains a draft pending Unity execution.

Integration boundaries

Documentation~/PREPARE_SURFACE_BINDING.md documents the existing API and limits: a root MeshCollider skips the entire Colliders step, mixed-material nodes receive one surface, a manual binding on a source node is not migrated when its collider moves to root, and missing assets are warnings. These policies are unchanged; this change does not claim to make existing-model migration or per-submesh ballistics complete.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

1 participant