VTubeTiny icon indicating copy to clipboard operation
VTubeTiny copied to clipboard

Components under a "Publisher" will not get a published value

Open HugoVG opened this issue 1 year ago • 1 comments

let's say we this stack of components image it should notify CharacterAnimatorComponent and SpeakingColorChangerComponent image but currently it will not notify SpeakingColorChangerComponent image Why does it do that? most components will Start once, and that's when they are made

public override void Start()
{
    _components = GetComponents<ISpeakingAwareComponent>(); //<--- 
    //...
}

after that they will never update.

Solution

On new Component Update all previous components.

Potentential issues

A component might do a "Should only happen once" event twice

HugoVG avatar Apr 16 '23 14:04 HugoVG