C# Class NetworkDiscoveryWithAnchors

Inherits from UNet's NetworkDiscovery script. Adds automatic anchor management on discovery. If the script detects that it should be the server then the script starts the anchor creation and export process. If the script detects that it should be a client then the script kicks off the anchor ingestion process.
Inheritance: NetworkDiscovery
Show file Open project: Microsoft/HoloToolkit-Unity Class Usage Examples

Public Properties

Property Type Description
BroadcastInterval int

Public Methods

Method Description
OnReceivedBroadcast ( string fromAddress, string data ) : void

Called by UnityEngine when a broadcast is received.

Private Methods

Method Description
CheckComponents ( ) : bool

Sanity checks that our scene has everything we need to proceed.

MaybeInitAsServer ( ) : void

If we haven't received a broadcast by the time this gets called we will start broadcasting and start creating an anchor.

Start ( ) : void

Method Details

OnReceivedBroadcast() public method

Called by UnityEngine when a broadcast is received.
public OnReceivedBroadcast ( string fromAddress, string data ) : void
fromAddress string When the broadcast came from
data string The data in the broad cast. Not currently used, but could /// be used for differntiating rooms or similar.
return void

Property Details

BroadcastInterval public property

Controls how often a broadcast should be sent to clients looking to join our session.
public int BroadcastInterval
return int