Files
UmaViewer/Assets
ritenseki 64087b534e Live: fix five silently-failing track paths + one init bug
All found by auditing the tracks LIVE_DEV_MAP marked as done. Every one of
them parses its keyframes correctly and then drops the result downstream with
no error, so the picture looks plausible and nothing ever surfaces the failure.
Verified against the bundles with tools/ before changing anything.

GlobalLight (48) — 9636 keys / 59 songs, never worked
  * Renderer.SetPropertyBlock() replaces the whole block rather than merging.
    AlterLateUpdate runs GlobalLight then BgColor1, and both allocated a fresh
    block for the same container.Renderers, so BgColor1 wiped all 13 rim
    properties every frame. Song 1177 carries GlobalLight x2 and CharaColor x2,
    and bgColor1/globalLight both cover 59/59 songs — this was never once live.
  * Both handlers now GetPropertyBlock -> modify -> SetPropertyBlock, sharing
    one persistent block. The stage-side BgColor1 branch and BlinkLight already
    did this; the two character-side handlers were the only exceptions.
  * _UseOriginalDirectionalLight / _OriginalDirectionalLightDir moved into the
    block too. They were written through renderer.materials, which instantiates
    a material copy and allocates an array on every frame, per renderer.

BgColor2 (9) — 14346 keys / 15 songs, at most one group survived
  * The dispatcher never filled the group name and the handler never read one,
    so up to 15 groups (son1010 carries BgWashA..BgWashO) each repainted the
    entire stage every frame and only the last one in list order survived.
  * Name is now threaded through and resolved via ResolveStageTargets, writing
    _AmbientColor through a MaterialPropertyBlock, resolved once and cached.
  * The name -> renderer mapping is still unknown and is NOT guessed here.
    BgWashA..O / LaserA..C are neither GameObject names nor _stageObjectUnits
    unit names (the three downloaded stages use concrete names like neonsign),
    and BlinkLight carries no index back into BgColor2. Unresolved names fall
    back to the previous whole-stage write and log a warning, so behaviour is
    never worse than before; delete the fallback once the mapping is known.

Spotlight3d (68) — 1089 keys / 31 songs
UVScrollLight (46)
  * Both wrote _Color. Enumerating all 499 shaders shows no Gallop/3D/Live/Stage
    shader declares it — the only two stage/Bg shaders that do are BgShadowOnly
    and RedAlphaGreenColorShadowFogUVScroll, neither related. Spotlight beams are
    StageBeamLight*, and UVScroll targets LightAdd1_UV and
    StageLightAdd1_UVAlphaMask_TransmittedLightMask; all use _MulColor0 /
    _MulColor1 / _ColorPower. The colour write was a no-op while _ColorPower kept
    working, so the lights tracked the music in brightness but never in colour.
  * This is the same defect as the BlinkLight _Color bug fixed in a3a7b83, twice
    over. "The property exists" is not "the target shader has it" — all three
    slipped through on that distinction.
  * UVScrollLight also gains the previously unused mulColor1, and both now use
    MaterialPropertyBlock with cached lookups instead of walking every renderer
    on the stage and touching r.materials each frame.

Transform (31) — 681 keys / 12 songs, never worked
  * UpdateTransform only consulted StageObjectUnitMap and had no else branch, so
    a group named after a GameObject silently did nothing. son1028's first group
    is light001_glow_001. This is the mirror image of the Object-track fix in
    a3a7b83, which was missing the unit-name path instead.
  * Also strips "(Clone)" on the child lookup, which UpdateObject already did.
  * TypeTree confirms LiveTimelineKeyTransformData has only position/rotate/
    scale and no OffsetType, so absolute writes are correct here.

StageController init — 4 permanently dark lights on live10149
  * SetActive(false) sat inside the dedupe check, so among same-named objects
    only the first was disabled. Track groups address containers, and the lights
    are their children: light001_wash_ground_a (x4), swing_wash_ground_a (x2),
    base_rotate_wash_ground_a (x2) and light000_wash_ground_a (x2) all sit under
    pfb_env_live10149_blinklight_wash_ground_a. The handler re-enables only the
    container, so that one disabled child was never turned back on.
  * Now only the topmost timeline-controlled light in each branch is disabled;
    descendants keep their prefab state and follow the parent. Dedupe and insert
    also agree on the stripped name now.

Only GlobalLight could be verified in the editor — song 1177 carries no
bgColor2, spotlight3d or transform data. The rest is code review plus bundle
ground truth.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 13:42:18 +08:00
..
2023-06-29 17:12:41 +08:00
2023-07-05 02:25:27 +08:00
2023-06-29 17:12:41 +08:00
2022-08-22 01:25:59 +08:00
2022-06-18 17:47:39 +02:00
2022-06-18 17:47:39 +02:00
2022-06-18 17:47:39 +02:00
2022-06-18 17:47:39 +02:00
2022-09-09 16:02:04 +08:00
2022-06-18 17:47:39 +02:00