Skip to main content

StreamingButton

A class in Root.Township, Alta.ScreenshotCamera.

Hand camera button whose light blinks while the camera is streaming. Client only.

Constructors​

MemberWhat it is
StreamingButton()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

9 private and internal fields
MemberWhat it is
private static readonly int _EmissionShader property ID for _Emission.
private Color activeColorLight colour for the on half of a blink.
private Color idleColorLight colour when not streaming, and for the off half of a blink.
private bool isActiveWhether the light is in its on state.
private Material materialThe light's own material copy.
private float nextChangeReal time at which the light next flips.
private Renderer pipThe renderer of the light.
private float pipTimeSeconds between blinks.
private IUnityUpdateMethod updateThe registered blink update, or null when not streaming.

Methods​

MemberWhat it is
protected override void Awake()Client: makes a material copy for the light and sets it to the idle colour.
protected override void UpdateSettings(HandCamera handCamera)Starts the blinking when the camera starts streaming and stops it, back to idle, when it stops.
1 private and internal method
MemberWhat it is
private void UpdatePip()Flips the light between active and idle colours every pipTime seconds.