Skip to content

Conversation

@sidequestlegend
Copy link
Contributor

@sidequestlegend sidequestlegend commented Jan 13, 2026

Summary by CodeRabbit

  • New Features

    • Added cache bust property to materials. The new property is displayed in the editor inspector and integrated into material change detection, signature tracking, and synchronization systems.
  • Chores

    • Updated package version to 3.2.1

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

📝 Walkthrough

Walkthrough

This change adds a new cacheBust property to the BanterMaterial system. The property is defined in the enum, implemented in the BanterMaterial class with serialization and update logic, surfaced in the inspector UI, and the package version is incremented to 3.2.1.

Changes

Cohort / File(s) Summary
Property Definition
Runtime/Scripts/Scene/BanterComponentProperty/BanterComponentPropertyNames.cs, Runtime/Scripts/Scene/Components/BanterMaterial.cs
Added new cacheBust enum member to PropertyName. Implemented serialized string field with public accessor CacheBust in BanterMaterial, including update callback triggers, signature calculation, deserialization, and forced synchronization logic.
Inspector UI
Editor/Components/BanterMaterialEditor.cs
Updated inspector label to include cacheBust in visible property list.
Version Bump
package.json
Incremented package version from 3.2.0 to 3.2.1.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • Ladypoly
  • emulamer

Poem

🐰 A bustling new cache appears with glee,
Signed and tracked for all to see,
The version bumps to mark the day,
When cacheBust came out to play!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Dev' is vague and generic, providing no meaningful information about the changeset beyond referencing the branch name. Replace with a descriptive title that summarizes the main change, such as 'Add cacheBust property to BanterMaterial component' or 'Add cacheBust support to material properties'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
Runtime/Scripts/Scene/Components/BanterMaterial.cs (1)

40-40: Consider adding a tooltip for consistency.

Other serialized fields in this class include [Tooltip(...)] attributes for documentation. Consider adding one for cacheBust to explain its purpose.

Suggested change
-        [See(initial = "")][SerializeField] internal string cacheBust = "";
+        [Tooltip("A value used to invalidate material caching. Changing this value forces a new material instance.")]
+        [See(initial = "")][SerializeField] internal string cacheBust = "";
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c0712eb and 28ce9ed.

⛔ Files ignored due to path filters (1)
  • OraPackage/com.sidequest.ora.zip is excluded by !**/*.zip
📒 Files selected for processing (5)
  • Editor/Components/BanterMaterialEditor.cs
  • Editor/Scripts/VisualScripting/VsStubsAllowed.cs
  • Runtime/Scripts/Scene/BanterComponentProperty/BanterComponentPropertyNames.cs
  • Runtime/Scripts/Scene/Components/BanterMaterial.cs
  • package.json
🧰 Additional context used
🧬 Code graph analysis (1)
Runtime/Scripts/Scene/Components/BanterMaterial.cs (3)
Runtime/Scripts/Scene/Components/BanterAttachedObject.cs (1)
  • UpdateCallback (103-146)
Runtime/Scripts/Scene/Components/BanterVideoPlayer.cs (2)
  • UpdateCallback (94-97)
  • GetSignature (258-261)
Runtime/Scripts/Scene/BanterScene.cs (1)
  • List (1456-1544)
🔇 Additional comments (8)
package.json (1)

3-3: LGTM!

The patch version bump to 3.2.1 is appropriate for this backward-compatible addition of the cacheBust property.

Runtime/Scripts/Scene/BanterComponentProperty/BanterComponentPropertyNames.cs (1)

175-175: LGTM!

The new cacheBust enum member is correctly added and follows the existing naming convention.

Runtime/Scripts/Scene/Components/BanterMaterial.cs (5)

90-128: Verify: cacheBust property changes have no effect in SetupMaterial.

The cacheBust property is included in ReSetup, GetSignature, deserialization, and sync, but SetupMaterial doesn't handle PropertyName.cacheBust. This means changing cacheBust via the public setter will trigger UpdateCallback, but nothing will actually happen since none of the conditional blocks respond to it.

If the intent is to force a texture reload when cacheBust changes, consider handling it alongside texture:

-                if (changedProperties?.Contains(PropertyName.texture) ?? false)
+                if (changedProperties?.Contains(PropertyName.texture) ?? changedProperties?.Contains(PropertyName.cacheBust) ?? false)

Otherwise, if cacheBust is only meant to affect the signature for external purposes, this may be intentional.


197-197: LGTM!

The public accessor follows the established pattern for triggering updates when the property changes.


218-226: LGTM!

ReSetup and GetSignature correctly include cacheBust in their property lists, consistent with the other component properties.


314-322: LGTM!

Deserialization for cacheBust follows the existing pattern for string properties, correctly casting to BanterString and checking the property name.


390-401: LGTM!

SyncProperties correctly includes the cacheBust property update with the appropriate type (PropertyType.String).

Editor/Components/BanterMaterialEditor.cs (1)

34-34: LGTM!

The editor UI correctly reflects the new cacheBust property in the visible properties list.

@GarethIW GarethIW self-requested a review January 13, 2026 11:49
@sidequestlegend sidequestlegend merged commit be38943 into main Jan 13, 2026
1 of 2 checks passed
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.

3 participants