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 class | 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...
|
|
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
-
◆ RefreshAllRunnerVisibilities()
static void RefreshAllRunnerVisibilities |
( |
| ) |
|
|
static |
Force a complete visibility refresh on all runners. Typically used if a runner is destroyed/shutdown.
◆ SetEnabled()
void SetEnabled |
( |
bool |
enabled | ) |
|
Sets the visibility state of this node.
- Parameters
-
◆ Component
UnityEngine.Component Component |
◆ PreferredRunner
If more than one runner instance is visible, this indicates which peer's clone of this entity should be visible.
◆ DefaultState