浏览代码

snap 10213

/main
Peter Andreasen 6 年前
当前提交
3d4c5178
共有 7 个文件被更改,包括 44 次插入26 次删除
  1. 2
      CHANGELOG.md
  2. 2
      Documentation/Animation.md
  3. 5
      Documentation/Characters.md
  4. 15
      Documentation/GettingStarted.md
  5. 26
      Documentation/SourceCode.md
  6. 2
      Packages/com.unity.multiplayer/LICENSE.md
  7. 18
      README.md

2
CHANGELOG.md


This file contains a summary of the changes that went into each release.
## [0.1] - 2018-10-20
## [0.1] - 2018-10-22
### Added
- First public release, Unite L.A. 2018

2
Documentation/Animation.md


### Setting up the First Person Controller
The Animator Controller is not references in the Characters Animator Component, but assigned to an Animator Controller Template
The Animator Controller is not referenced in the Characters Animator Component, but assigned to an Animator Controller Template
(`AnimGraph_AnimatorController`). This template wraps the controller in an AnimatorControllerPlayable and forwards game state
to the Animator Controllers parameters etc.

5
Documentation/Characters.md


# Character Pipeline
### Iteration
We assume an iterative workflow where characters are put into game in their earliest/mockup phase and continuously updated as the projects progresses, bug surface and standards change late in production.
We assume an iterative workflow where characters are put into game in their earliest/mockup phase and continuously
updated as the projects progresses, bug surface and standards change late in production.
### Authoring
Characters are Modeled and Rigged in Maya and exported into FBX files.

### Prefabs
Prefab are where Materials are assigned and additional components for game play systems are added and configures.
Prefab are where Materials are assigned and additional components for game play systems are added and configured.
We use Prefab Variants as they allow the prefab to stay up to date as mesh, skeleton and skinning changes throughout production.
![](Images/CharacterPrefabs.png)

15
Documentation/GettingStarted.md


Working with a multiplayer game in Unity means you will be working a lot with the
standalone player. To make a client and a server that talks over a network connection there
has to be two processes. To make this workflow as frictionless as possible, we
use assetbundles for all the content (levels and characters etc.). The only thing that
goes into the standalone player is the code and a single,
very small, bootstrapper scene. Only if you have made changes to a level or a prefab
do you have to rebuild the assetbundles. (And you can rebuild selectively -- to some degree.)
use assetbundles for all the content (levels and characters etc.).
The only thing that goes into the standalone player is the code and a single, very small, bootstrapper scene.
Only if you have made changes to a level or a prefab do you have to rebuild the assetbundles.
(And you can rebuild selectively -- to some degree.)
The Project Tools window is used to make this workflow function in practice. The most commonly used functions here are:

__Levels [force]__ | Build all the levels into bundles
__Assets [force]__ | Build all prefabs into bundles (players etc)
__Assets [force]__ | Build all prefabs into bundles (players etc)
__Update Registry__ | Updates the registry used when building prefab bundles.
Updating the registry only needs to be done when new game elements (ect. Character, Replicated entity, Hero definition)
are added to the project
From the _boot mode_ a standalone player can enter other modes. Some examples:

26
Documentation/SourceCode.md


## Game class
The Game class (Game.cs) is a MonoBehavior that defines the main loop of the game.
All gamecode is run from Game.cs Update method (with a few exceptions).
All gamecode is run from Game.Update method (with a few exceptions).
The game class can be requested to update a specific _GameLoop_ class.
The game class can be requested to update a specific _GameLoop_.
Gameloops implements various mode the game can be in.
They handle initialization and shutdown of required systems and updates systems in correct order.
Active gameloop can be changed at runtime.

## ServerGameLoop
ServerGameLoop (ServerGameLoop.cs) handles connection to a list of clients and update all server systems.
## ClientGameLoop.cs
## ClientGameLoop
This is used as a way to preview game without having to start up both server and client.
It uses a mix of server and client systems and that can lead to features not working correctly.
It uses a mix of server and client systems and is used as a way to preview game without building bundles and starting up server and client.
This is the gameloop that is used when user presses play in editor with a game scene loaded.
## Modules

Server and client have different ReplicatedEntityRegistry allowing for different prefabs to be spawned on server and client each representing the same entity (but they both need same set of serializable components)
Components that has data that should be replicated needs to implement the INetworkSerializable interface and be attacheds to same gameobject as ReplicatedEntity component.
To replicate an entity you need to create a scriptable object deriving from ReplicatedEntityFactory.
To replicate an ECS entity you need to create a scriptable object deriving from ReplicatedEntityFactory.
This class is also registered in ReplicatedEntityRegistry and has abstracts methods that needs to be implemented to create entity and create classes that serializes/deserializes component
### Player Module

### Character Module
Character module handles character abilities, animation and UI.
A character is define a prefab with either Character or Character1P MonoBehavior attached.
A character is define by prefab with either Character or Character1P MonoBehavior attached.
Characters are setup using the *CharacterTypeDefinition* scriptable object.
It has references to Server and Client versions of the 3P character prefab, and reference to the 1P prefab character that is instantiated in 1P view.
Characters are setup using the *CharacterTypeDefinition* scriptable object.
It has references to Server and Client versions of the 3P character, and reference to the 1P character that is instantiated in 1P view.
Each character is defined by 3 prefabs. Client version (3P), Server version (3P) and a 1P version.
The first two represents the client and server version of the same replicated entity.
Items are replicated but currently only client versions of prefabs have any logic or presentation.
Items are replicated but currently only client versions of prefabs have any logic or presentation.
When items are updated they read state of relevant abilities and uses that to trigger effects.
### Effect Module
Effect module is responsible for showing short clientside effects (gfx and sound).

Each effect is setup using a scriptable object (e.g. SpatialEffectTypeDefinition) that defines what prefab should be used for the effect and how large effect pool should be.
Effect are requested by gamecode by creating components (e.g SpatialEffectRequest) that are then picked up by effect systems and effct is triggered.
Effect are requested by gamecode by creating entities with request component (e.g SpatialEffectRequest) that are then picked up by effect systems and effct is triggered.
## Grenade Module
Grenade module handles creation and updating of grenades. Grenades is updated on server and interpolated on client.

2
Packages/com.unity.multiplayer/LICENSE.md


[MyPackageName] copyright © [YEAR] Unity Technologies ApS
Unity Transport copyright © 2018 Unity Technologies ApS
Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).

18
README.md


[network transport layer](https://github.com/Unity-Technologies/multiplayer) as well as the [Entity-Component System](https://unity3d.com/unity/features/job-system-ECS).
In the case of ECS, we have primarily adopted the "ECS-pattern" and use it in
hybrid mode with a lot of regular components. As more and more features of
Unity become availble in ECS-aware versions, we will migrate to them.
Unity become available in ECS-aware versions, we will migrate to them.
## Status and prerequisites

the following steps right after the initial import:
> 1. Search for `t:prefab` in the Project search field. Then click on the first prefab and shift+click on the last to select them all. Right click and select __Reimport__.
> 2. Search for `t:model` in the Project search field. Repeat the same steps as for prefabs to reimport them all.
> 3. __IF__ you are on a version older than beta 6, you may have had a few crashes during import. In that case you need to find `GooRocket` and `GooRifle` in project, right click and select __Reimport__.
>
> One day soon we will remove this note and there will be cake.

Now hit the green __Start__ button. This should launch two processes: one is
a standalone, headless server, the other is a client that will attempt to
connect to the server.
Congratulations! If you made it this far you should celebrate a bit!
## Development of FPS Sample, Contributions etc.
As of today, internally development of the project happens on Perforce. We
push versions of the project to github from there. As we do that we will update
the [CHANGELOG](CHANGELOG.md) with highlights but the full history is not
carried over.
For legal and practical reasons we are not able to take larger contributions
just now. We are working to see how we can make it happen and we are always happy
to hear about bugfixes and ideas for improvements in our forum. If you post
bugfixes, we remind you that they will be covered by
[Unity Contribution Agreement](https://unity3d.com/legal/licenses/Unity_Contribution_Agreement).
## More information

正在加载...
取消
保存