Skip to main content

FocusButton

A class in Root.Township, Alta.ScreenshotCamera.

Hand camera button that shows the current focus mode of its FocusPuller as text. Client only (does nothing on a headless server).

Constructors​

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

Fields​

3 private and internal fields
MemberWhat it is
private FocusPuller focusPullerThe focus puller whose mode is shown.
private string[] modeTextLabel text for each FocusPuller.FocusMode, indexed by the enum value.
private TextRenderer textRendererThe text that shows the mode.

Methods​

MemberWhat it is
protected override void Awake()Client: subscribes to focus mode changes and shows the current mode.
protected override void UpdateSettings(HandCamera handCamera)Empty; the label follows the focus puller, not the camera settings.
1 private and internal method
MemberWhat it is
private void OnFocusModeChanged(FocusPuller.FocusMode currentFocus)Sets the label to the text for the new focus mode.