Unity Networking Flashcards

1
Q

What is HLAPI?

A

High Level API - it provides simple and secure client/server network model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the Network Manager do?

A

This Network Manager can control the state of a Multiplayer project, including game state management, spawn management, scene management, matchmaking and allowing access to debugging information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What function is a good place to do initialization that is only for the local player, such as configuring cameras and input?

A

OnStartLocalPlayer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What class should a script using network functions derive from?

A

NetworkBehaviour rather than MonoBehaviour.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What namespace does a script need to use network functions?

A

UnityEngine.Networking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How would you add a check to see if gameobject is linked to the local player?

A

isLocalPlayer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What component would you add to a gameobject to keep it’s position in sync with the server?

A

a NetworkTransform

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you speed up the server updating rate on an object that is randomly changing position?

A

Increase the Network Speed Rate on the NetworkTransform

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What component controls an object’s network identity?

A

NetworkIdentity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you add a new prefab that will be spawned sometime in the future?

A

With the NetworkManager selected, add the prefab to a new row in the Registered Spawnable Prefabs list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do you indicate that a function will be called by the Client, but will be run on the Server?

A

By adding the [Command] attribute before the function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When making a networked command, what must the function name begin with?

A

“Cmd”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does “Spawn” mean in regards to Multiplayer Networking HLAPI?

A

It means to create a GameObject on the Server and on all of the Clients connected to the Server. The GameObject will then be managed by the spawning system; state updates are sent to Clients when the object changes on the Server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you “spawn” a gameobject?

A

NetworkServer.Spawn(gameobject);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How would you make important variables such as player health and damage network aware and working under Server authority?

A

By using State Synchronization and a special member variable on networked objects called SyncVars

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you indicate a variable is a Network synchronized variable?

A

By adding [SyncVar] before the variable

17
Q

How do you check if script is being run on the server?

A

isServer

18
Q

How would you call a function on the Server, but execute it on the Clients?

A

Make the function into a ClientRpc call, use the [ClientRpc] attribute and add “Rpc” as a prefix to the name of the function.

19
Q

How do you set a gameobject to be a potential spawn point?

A

By adding a NetworkStartPosition component

20
Q

How do you sync a gameobject’s animations with the server?

A

by adding a NetworkAnimator

21
Q

What does it mean to run a server in “headless mode”?

A

A headless system is a computer that operates without a monitor, graphical user interface (GUI) or peripheral devices, such as keyboard and mouse.

22
Q

How do you set a gameobject’s visibility to only be visible within a player’s “area of interest”?

A

By adding a NetworkProximityChecker

23
Q

When does the server update SyncVar values to clients?

A

SyncVar updates are sent automatically by the server to all the clients when the value of a SyncVar changes on the server.

24
Q

Do SyncVars that change on the client automatically change on the server?

A

No, SyncVars update to the clients from the server