Identifies visible/audible components (such as renderers, canvases, lights) that should be enabled/disabled by NetworkRunner.IsVisible. Automatically added to scene objects and spawned objects during play if running in NetworkProjectConfig.PeerModes.Multiple. Additionally this component can be added manually at development time to identify specific Behaviours or Renderers you would like to restrict to one enabled copy at a time.
More...
Inherits MonoBehaviour.
|
enum | PreferredRunners |
| The peer runner that will be used if more than one runner is visible, and this node was manually added by developer (indicating only one instance should be visible at a time). More...
|
|
|
void | SetEnabled (bool enabled) |
| Sets the visibility state of this node.
|
|
|
static void | AddVisibilityNodes (GameObject go, NetworkRunner runner) |
| Find all component types that contribute to a scene rendering, and associate them with a RunnerVisibilityNode component, and add them to the runner's list of visibility nodes.
|
|
static void | RefreshAllRunnerVisibilities () |
| Force a complete visibility refresh on all runners. Typically used if a runner is destroyed/shutdown.
|
|
|
UnityEngine.Component | Component |
| The associated component with this node. This Behaviour or Renderer will be enabled/disabled when its parent NetworkRunner.IsVisible is changed.
|
|
PreferredRunners | PreferredRunner |
| If more than one runner instance is visible, this indicates which peer's clone of this entity should be visible.
|
|
|
bool | DefaultState [get, set] |
| Set to false to indicate that this object should remain disabled even when NetworkRunner.IsVisible is set to true.
|
|
Identifies visible/audible components (such as renderers, canvases, lights) that should be enabled/disabled by NetworkRunner.IsVisible. Automatically added to scene objects and spawned objects during play if running in NetworkProjectConfig.PeerModes.Multiple. Additionally this component can be added manually at development time to identify specific Behaviours or Renderers you would like to restrict to one enabled copy at a time.
◆ PreferredRunners
The peer runner that will be used if more than one runner is visible, and this node was manually added by developer (indicating only one instance should be visible at a time).
Enumerator |
---|
InputAuthority | The peer/runner with input authority will be used if visible.
|
Server | The server peer/runner will be used if visible.
|
Client | The first client peer/runner will be used if visible.
|
◆ AddVisibilityNodes()
static void AddVisibilityNodes |
( |
GameObject |
go, |
|
|
NetworkRunner |
runner |
|
) |
| |
|
static |
Find all component types that contribute to a scene rendering, and associate them with a RunnerVisibilityNode component, and add them to the runner's list of visibility nodes.
- Parameters
-
◆ SetEnabled()
void SetEnabled |
( |
bool |
enabled | ) |
|
Sets the visibility state of this node.
- Parameters
-