Ir al contenido

UI Culling — Changelog

Esta página aún no está disponible en tu idioma.

All notable changes to this pack are recorded here.

The format follows Keep a Changelog and the pack follows Semantic Versioning.

The version below must always match the one declared in Runtime/AssemblyInfo.cs — that is the version the FOS Hub shows, and the one the Hub compares against the installed Core.


Nothing yet.


First release. Requires FOS Essentials Core 1.0.0.

Components

  • FOSUICullingManager — one per scene, owns the loop and drives everything.
  • FOSUICullingTarget — one per UI, holds settings only and does no per-frame work.

Switching

  • Distance culling with squared distances, two-threshold hysteresis and round-robin checks spread over a configurable per-frame budget.
  • Visibility is written only when it changes, so a stable scene performs no component writes at all.
  • The first frame evaluates everything at once, otherwise distant UIs would stay lit until the cursor completed a full lap.
  • Per-UI distance override, or inherit the manager’s default.
  • Distance reference transform, for a wide panel whose pivot sits at its centre and therefore reads as further away than its nearest edge.
  • Optional line-of-sight pass, off by default, cast from the player’s head and only for UIs that already passed the distance test.

Editor tooling

  • Scene scan: adds the components, wires the Canvas, the GraphicRaycaster and the colliders, fills the manager’s list. Re-runnable without overwriting manual settings. Nested canvases and screen-space canvases are skipped and reported.
  • The target inspector states the distance actually applied and where it comes from, since the -1 convention meaning inherit is not guessable.
  • Warnings for a target missing from the manager’s list, colliders left unlisted, several managers in the scene, and line of sight enabled with an empty obstacle mask.
  • Interface translated into English, French, Spanish and German.

Prefabs

  • FOSUICullingManager.
  • The manager caches every target’s configuration into flat arrays at Start and then only touches Unity components. Udon is an interpreted VM where the dominant cost is the number of behaviours ticking, not the arithmetic: thirty UIs cost one active behaviour.
  • What gets disabled is the Canvas, the raycaster and the colliders — never SetActive(false), which would force a full layout rebuild on the way back and re-run every OnEnable, Udon included.
  • The colliders matter more than the raycaster. VRChat’s pointer does not go through the GraphicRaycaster: it casts a physics ray and then looks for a VRC_UiShape on whatever collider it hit. Disabling the Canvas alone leaves an invisible UI whose buttons stay clickable.
  • A distance test is used rather than a raycast because a ray answers “is something in the way”, not “am I close”. Raycasting is kept for the optional occlusion pass, which is what a ray is actually for.
  • The reasoning behind each of these choices is in README.md.