Страница:
Library Initialization
Страницы
Attribute Message System
Binary Serialization
BitWriter & BitReader
Connection Approval
Core Components
Custom Transports
Dedicated Servers
Differences from UNET HLAPI
Getting Started
HLAPI Differences
Handshake
Home
Lag Compensation
Library Initialization
Limitations
Message Encryption
Message System
Modularity
NetworkConfig
NetworkProfiler Editor Window
Networked Object Pooling
NetworkedAnimator
NetworkedBehaviour
NetworkedNavMeshAgent
NetworkedObject
NetworkedTransform
NetworkedVar
NetworkingManager
Object & Behaviour Relation
Object Ownership
Object Spawning
Observer
Optimization
Passthrough Messages
Prototype Components
Roadmap
Scene Management
SyncedVars
Targeted Messages
TrackedObject
4
Library Initialization
Albin Corén редактировал(а) эту страницу 2018-04-17 17:13:36 +02:00
Initializing the MLAPI is fairly simple. You need a GameObject with the NetworkingManager component added to it. The NetworkingManager class has a static singleton reference to itself making it easy to access from anywhere. To initialize the library. You have three options.
- Host mode
This mode runs a Server and a virtual Client connected to its own server.
Usage:
NetworkingManager.singleton.StartHost();
- Client mode
This mode runs a Client that connects to a Server or Host.
Usage:
NetworkingManager.singleton.StartClient();
- Server mode
This mode runs a Server which other Clients can connect to.
Usage:
NetworkingManager.singleton.StartServer();
Getting Started
The Basics
- Message System
- Object Spawning
- Object & Behaviour Relation
- Modularity
- NetworkedVar
- Scene Management
- Object Ownership
Components
Advanced Topics
- Encryption
- Networked Object Pooling
- Lag Compensation
- BitWriter & BitReader
- Custom Transports
- Optimization
- Network Profiler Window
- Dedicated Servers