Zhanxin Yang
2 年前
当前提交
14886b49
共有 3978 个文件被更改,包括 8197 次插入 和 0 次删除
-
1.editorconfig
-
53.gitattributes
-
90.gitignore
-
113ARCHITECTURE.md
-
541CHANGELOG.md
-
1CODE_OF_CONDUCT.md
-
61CONTRIBUTING.md
-
0InitCodeMarker
-
5LICENSE.md
-
134README.md
-
66Third Party Notices.md
-
24third-party contributors.md
-
2Unity.Multiplayer.Samples.BossRoom.Client.csproj.DotSettings
-
16.git/config
-
1.git/description
-
1.git/HEAD
-
15.git/hooks/applypatch-msg.sample
-
24.git/hooks/commit-msg.sample
-
173.git/hooks/fsmonitor-watchman.sample
-
3.git/hooks/post-checkout
-
3.git/hooks/post-commit
-
3.git/hooks/post-merge
-
8.git/hooks/post-update.sample
-
14.git/hooks/pre-applypatch.sample
-
49.git/hooks/pre-commit.sample
-
13.git/hooks/pre-merge-commit.sample
-
3.git/hooks/pre-push
-
53.git/hooks/pre-push.sample
-
169.git/hooks/pre-rebase.sample
-
24.git/hooks/pre-receive.sample
-
42.git/hooks/prepare-commit-msg.sample
-
78.git/hooks/push-to-checkout.sample
-
128.git/hooks/update.sample
-
711.git/index
-
6.git/info/exclude
-
129.git/lfs/objects/00/45/00450c54f1fed50d5695ff1d08564fa715eaa54a99f80ad261ea45611420cd3c
-
188.git/lfs/objects/00/9d/009d9ad15faada4d667615b6a913c8cf2a238b30ec7ac242b8036ce62574de53
-
611.git/lfs/objects/00/dd/00dd0f59011a838da7a62550abbcf924353f96fdf669ae9c6fed354db07f3418
-
1.git/lfs/objects/01/01/0101c50ed4322bc1a87b3cb0e6e3bcaa4305606ef57015f76d6bf88f1d6e1010
-
29.git/lfs/objects/01/0b/010bb056dbee7228d7dc847ffaa324a8f0e27a5d33579fee9a7293043f33491a
-
68.git/lfs/objects/01/22/01222ac025a1f5b90f3f129eee7bfac7fb05223a1edd84aecf2171ec34b10708
-
244.git/lfs/objects/02/13/0213620ebb879e4798ccfe04df3ae37b005771c6d7b53a2aac858a4930929ad5
-
456.git/lfs/objects/02/99/029918ba4a9640c23a3cc74b56649e0aa264497b6e9932ebe026986cd4166726
-
1001.git/lfs/objects/03/0f/030f51a93a4be9ddf42985e5e79413ba054ef7f049439117f885f7afc6dd5d3b
-
35.git/lfs/objects/03/3c/033c9aced26c2150df2e86c00a2fede7cccc41c7828b2f59af78a866810eccf6
-
179.git/lfs/objects/03/8a/038a2df2a177de24ef8ae5860f9967b0a8dcbc98fdc46a33a87fabd422d13a20
-
248.git/lfs/objects/03/bd/03bdd86ccc9a3e60eef2105172a1a27bc7a0f9bc882e89bb24bc1b0f04e21fec
-
20.git/lfs/objects/04/79/0479e0ef2ecf239740a8f7acc344d44ea768652b7382c0d86b770dc1f01ad372
-
78.git/lfs/objects/05/5e/055e3739c94dd9806536b06b11773379924ae4a4058c84ad9f3e4e577ad3ca94
-
1001.git/lfs/objects/05/dd/05ddc342c7eb4b882050be2a364c0b9d425d9521fdbe27bc4871228c77877f46
-
90.git/lfs/objects/06/89/068939f5fca46b7b80b5f2947c17717e7f426c2f2379a6631aabe0eaac0066d1
-
15.git/lfs/objects/07/ee/07ee87b3a88737f941419a8d9b30b4a28715782897fffa300a3bb9cd43d6161a
-
1001.git/lfs/objects/08/20/08206e447180d7a3f80237a85a6afb48a5c8b587c0244bb7c9c6303c29225132
-
131.git/lfs/objects/08/a5/08a5267aac7b8818c853a619e448dbd75029cb7d2dd22e1eff6db7eac14f0a45
-
44.git/lfs/objects/08/d4/08d470712613f6f55710a51cc162b2117356862afbd2eced73aa4a54689bf0d8
1
.editorconfig
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
# 3D models |
|||
*.3dm filter=lfs diff=lfs merge=lfs -text |
|||
*.3ds filter=lfs diff=lfs merge=lfs -text |
|||
*.blend filter=lfs diff=lfs merge=lfs -text |
|||
*.c4d filter=lfs diff=lfs merge=lfs -text |
|||
*.collada filter=lfs diff=lfs merge=lfs -text |
|||
*.dae filter=lfs diff=lfs merge=lfs -text |
|||
*.dxf filter=lfs diff=lfs merge=lfs -text |
|||
*.[fF][bB][xX] filter=lfs diff=lfs merge=lfs -text |
|||
*.jas filter=lfs diff=lfs merge=lfs -text |
|||
*.lws filter=lfs diff=lfs merge=lfs -text |
|||
*.lxo filter=lfs diff=lfs merge=lfs -text |
|||
*.ma filter=lfs diff=lfs merge=lfs -text |
|||
*.max filter=lfs diff=lfs merge=lfs -text |
|||
*.mb filter=lfs diff=lfs merge=lfs -text |
|||
*.obj filter=lfs diff=lfs merge=lfs -text |
|||
*.ply filter=lfs diff=lfs merge=lfs -text |
|||
*.skp filter=lfs diff=lfs merge=lfs -text |
|||
*.stl filter=lfs diff=lfs merge=lfs -text |
|||
*.ztl filter=lfs diff=lfs merge=lfs -text |
|||
# Audio |
|||
*.aif filter=lfs diff=lfs merge=lfs -text |
|||
*.aiff filter=lfs diff=lfs merge=lfs -text |
|||
*.it filter=lfs diff=lfs merge=lfs -text |
|||
*.mod filter=lfs diff=lfs merge=lfs -text |
|||
*.mp3 filter=lfs diff=lfs merge=lfs -text |
|||
*.ogg filter=lfs diff=lfs merge=lfs -text |
|||
*.s3m filter=lfs diff=lfs merge=lfs -text |
|||
*.wav filter=lfs diff=lfs merge=lfs -text |
|||
*.xm filter=lfs diff=lfs merge=lfs -text |
|||
# Fonts |
|||
*.otf filter=lfs diff=lfs merge=lfs -text |
|||
*.ttf filter=lfs diff=lfs merge=lfs -text |
|||
# Images |
|||
*.bmp filter=lfs diff=lfs merge=lfs -text |
|||
*.exr filter=lfs diff=lfs merge=lfs -text |
|||
*.gif filter=lfs diff=lfs merge=lfs -text |
|||
*.hdr filter=lfs diff=lfs merge=lfs -text |
|||
*.iff filter=lfs diff=lfs merge=lfs -text |
|||
*.jpeg filter=lfs diff=lfs merge=lfs -text |
|||
*.jpg filter=lfs diff=lfs merge=lfs -text |
|||
*.pict filter=lfs diff=lfs merge=lfs -text |
|||
*.png filter=lfs diff=lfs merge=lfs -text |
|||
*.psd filter=lfs diff=lfs merge=lfs -text |
|||
*.[tT][gG][aA] filter=lfs diff=lfs merge=lfs -text |
|||
*.tif filter=lfs diff=lfs merge=lfs -text |
|||
*.tiff filter=lfs diff=lfs merge=lfs -text |
|||
# Unity |
|||
*.unity filter=lfs diff=lfs merge=lfs text |
|||
*.prefab binary |
|||
*.asset filter=lfs diff=lfs merge=lfs -text |
|||
*.anim filter=lfs diff=lfs merge=lfs -text |
|||
*.tga filter=lfs diff=lfs merge=lfs -text |
|
|||
# This .gitignore file should be placed at the root of your Unity project directory |
|||
# |
|||
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore |
|||
# |
|||
/[Ll]ibrary/ |
|||
/[Tt]emp/ |
|||
/[Oo]bj/ |
|||
/[Bb]uild/ |
|||
/[Bb]uilds/ |
|||
/[Ll]ogs/ |
|||
/[Uu]ser[Ss]ettings/ |
|||
|
|||
/.Editor |
|||
|
|||
# output dir |
|||
/Bin/ |
|||
|
|||
# MemoryCaptures can get excessive in size. |
|||
# They also could contain extremely sensitive data |
|||
/[Mm]emoryCaptures/ |
|||
|
|||
# Asset meta data should only be ignored when the corresponding asset is also ignored |
|||
!/[Aa]ssets/**/*.meta |
|||
|
|||
# Uncomment this line if you wish to ignore the asset store tools plugin |
|||
# /[Aa]ssets/AssetStoreTools* |
|||
|
|||
# Autogenerated Jetbrains Rider plugin |
|||
/[Aa]ssets/Plugins/Editor/JetBrains* |
|||
|
|||
# Visual Studio cache directory |
|||
.vs/ |
|||
|
|||
# Gradle cache directory |
|||
.gradle/ |
|||
|
|||
# Autogenerated VS/MD/Consulo solution and project files |
|||
ExportedObj/ |
|||
.consulo/ |
|||
*.csproj |
|||
*.unityproj |
|||
*.sln |
|||
*.suo |
|||
*.tmp |
|||
*.user |
|||
*.userprefs |
|||
*.pidb |
|||
*.booproj |
|||
*.svd |
|||
*.pdb |
|||
*.mdb |
|||
*.opendb |
|||
*.VC.db |
|||
.vsconfig |
|||
|
|||
# Unity3D generated meta files |
|||
*.pidb.meta |
|||
*.pdb.meta |
|||
*.mdb.meta |
|||
|
|||
# Unity3D generated file on crash reports |
|||
sysinfo.txt |
|||
|
|||
# Builds |
|||
*.apk |
|||
*.aab |
|||
*.unitypackage |
|||
|
|||
# Crashlytics generated file |
|||
crashlytics-build.properties |
|||
|
|||
# Packed Addressables |
|||
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* |
|||
|
|||
# Temporary auto-generated Android Assets |
|||
/[Aa]ssets/[Ss]treamingAssets/aa.meta |
|||
/[Aa]ssets/[Ss]treamingAssets/aa/* |
|||
|
|||
.DS_Store |
|||
|
|||
.idea |
|||
|
|||
InitCodeMarker |
|||
|
|||
# User-specific stuff |
|||
.idea/**/workspace.xml |
|||
.idea/**/tasks.xml |
|||
.idea/**/usage.statistics.xml |
|||
.idea/**/dictionaries |
|||
.idea/**/shelf |
|
|||
# Architecture |
|||
This document describes the high-level architecture of Boss Room. |
|||
If you want to familiarize yourself with the code base, you are just in the right place! |
|||
|
|||
Boss Room is an 8-player co-op RPG game experience, where players collaborate to take down some minions, and then a boss. Players can select between classes that each have skills with didactically interesting networking characteristics. Control model is click-to-move, with skills triggered by mouse button or hotkey. |
|||
|
|||
Code is organized into three separate assemblies: `Client`, `Server` and `Shared` (which, as its name implies, contains shared functionality that both client and the server require). |
|||
|
|||
## Host model |
|||
Boss Room uses a Host model for its server. This means one client acts as a server and hosts the other clients. |
|||
|
|||
A common pitfall of this pattern is writing the game in such a way that it is virtually impossible to adapt to a dedicated server model. |
|||
|
|||
We attempted to combat this by using a compositional model for our client and server logic (rather than having it all combined in single modules): |
|||
- On the Host, each GameObject has `{Server, Shared, Client}` components. |
|||
- If you start up the game as a dedicated server, the client components will disable themselves, leaving you with `{Server, Shared}` components. |
|||
- If you start up as a client, you get the complementary set of `{Shared, Client}` components. |
|||
|
|||
This approach works, but requires some care: |
|||
- If you have server and clients of a shared base class, you need to remember that the shared code will run twice on the host. |
|||
- You also need to take care about code executing in `Start` and `Awake`: if this code runs contemporaneously with the `NetworkManager`'s initialization, it may not know yet whether the player is a host or client. |
|||
- We judged this extra complexity worth it, as it provides a clear road-map to supporting true dedicated servers. |
|||
- Client-server separation also allows not having god-classes where both client and server code are intermingled. This way, when reading server code, you do not have to mentally skip client code and vice versa. This helps making bigger classes more readable and maintainable. Please note that this pattern can be applied on a case by case basis. If your class never grows too big, having a single `NetworkBehaviour` is perfectly fine. |
|||
|
|||
## Connection flow |
|||
The Boss Room network connection flow is owned by the `GameNetPortal`: |
|||
- The Host will invoke either `GameNetPortal.StartHost` or `StartUnityRelayHost` if Unity Relay is being used. |
|||
- The client will invoke either `ClientGameNetPortal.StartClient` or `StartClientUnityRelayModeAsync`. |
|||
- Boss Room's own connection validation logic is performed in `ServerGameNetPortal.ApprovalCheck`, which is plugged in to the `NetworkManager`'s connection approval callback. Here, some basic information about the connection is recorded (including a GUID, to facilitate future reconnect logic), and success or failure is returned. In the future, additional game-level failures will be detected and returned (such as a `ServerFull` scenario). |
|||
|
|||
## Data model |
|||
Game data in Boss Room is defined in `ScriptableObjects`. The `ScriptableObjects` are organized by enum and made available in a singleton class: the `GameDataSource`, in particular `ActionDescription` and `CharacterData`. `Actions` represent discrete verbs (like swinging a weapon, or reviving someone), and are substantially data driven. Characters represent both the different player classes, and also monsters, and represent basic details like health, as well as what "Skill" Actions are available to each Character. |
|||
|
|||
## Transports |
|||
Currently two network transport mechanisms are supported: |
|||
- IP based |
|||
- Unity Relay Based |
|||
|
|||
In the first, the clients connect directly to a host via IP address. This will only work if both are in the same local area network or if the host forwards ports. |
|||
|
|||
For Unity Relay based multiplayer sessions, some setup is required. Please see our guide [here](Documentation/Unity-Relay/README.md). |
|||
|
|||
Please see [Multiplayer over internet](README.md) section of our Readme for more information on using either one. |
|||
|
|||
The transport is set in the transport field in the `NetworkManager`. We are using the following transport: |
|||
- **Unity Transport Package (UTP):** Unity Transport Package is a network transport layer, packaged with network simulation tools which are useful for spotting networking issues early during development. This protocol is initialized to use direct IP to connect, but is configured at runtime to use Unity Relay if starting a game as a host using the Lobby Service, or joining a Lobby as a client. Unity Relay is a relay service provided by Unity services, supported by Unity Transport. See the documentation on [Unity Transport Package](https://docs-multiplayer.unity3d.com/docs/transport-utp/about-transport-utp/#unity-transport-package-utp) and on [Unity Relay](https://docs-multiplayer.unity3d.com/docs/relay/relay). |
|||
|
|||
To add new transports in the project, parts of `GameNetPortal` and `ClientGameNetPortal` (transport switches) need to be extended. |
|||
|
|||
## Game state / Scene flow |
|||
In Boss Room, scenes correspond to top-level Game States (see `GameStateBehaviour` class) in a 1:1 way. That is, there is a `MainMenu` scene, `Character Select` scene (and state), and so on. |
|||
|
|||
Because it is currently challenging to have a client be in a different scene than the server it's connected to, the options for Netcode developers are either to not use scenes at all, or to use scenes, and let game state transitions on the host drive game state transitions on the client indirectly by forcing client scene transitions through Netcode's networked scene management. |
|||
|
|||
We chose the latter approach. |
|||
|
|||
Each scene has exactly one `GameStateBehaviour` (a specialization of `Netcode.NetworkBehaviour`), that is responsible for running the global state logic for that scene. States are transitioned by triggered scene transitions. |
|||
|
|||
## Important classes |
|||
|
|||
**Shared** |
|||
- `NetworkCharacterState` contains NetworkVariables that store the state of any given character, and both server and client RPC endpoints. The RPC endpoints only read out the call parameters and then raise events from them; they don’t do any logic internally. |
|||
|
|||
**Server** |
|||
- `ServerCharacterMovement` manages the movement Finite State Machine (FSM) on the server. Updates the NetworkVariables that synchronize position, rotation and movement speed of the entity on its FixedUpdate. |
|||
- `ServerCharacter` has the `AIBrain`, as well as the ActionQueue. Receives action requests (either from the AIBrain in case of NPCs, or user input in case of player characters), and executes them. |
|||
- `AIBrain` contains main AI FSM. |
|||
- `Action` is the abstract base class for all server actions |
|||
- `MeleeAction`, `AoeAction`, etc. contain logic for their respective action types. |
|||
|
|||
**Client** |
|||
- `ClientCharacterVisualization` primarily is a host for the running `ActionFX` class. |
|||
- `ClientInputSender `. On a shadow entity, will self-destruct. Listens to inputs, interprets them, and then calls appropriate RPCs on the RPCStateComponent. |
|||
- `ActionFX` is the abstract base class for all the client-side action visualizers |
|||
- `MeleeActionFX`, `AoeActionFX`, etc. Contain graphics information for their respective action types. |
|||
|
|||
## Movement action flow |
|||
- Client clicks mouse on target destination. |
|||
- Client->server RPC, containing target destination. |
|||
- Anticipatory animation plays immediately on client. |
|||
- Server performs pathfinding. |
|||
- Once pathfinding is finished, server representation of entity starts updating its NetworkVariables at the same cadence as FixedUpdate. |
|||
- Visuals GameObject never outpaces the simulation GameObject, and so is always slightly behind and interpolating towards the networked position and rotation. |
|||
|
|||
## Navigation System |
|||
Each scene which uses navigation or dynamic navigation objects should have a `NavigationSystem` component on a scene GameObject. That object also needs to have the `NavigationSystem` tag. |
|||
|
|||
### Building a navigation mesh |
|||
The project is using `NavMeshComponents`. This means direct building from the Navigation window will not give the desired results. Instead find a `NavMeshComponent` in the given scene e.g. a **NavMeshSurface** and use the **Bake** button of that script. Also make sure that there is always only one navmesh file per scene. Navmesh files are stored in a folder with the same name as the corresponding scene. You can recognize them based on their icon in the editor. They follow the naming pattern "NavMesh-\<name-of-creating-object\.asset>" |
|||
|
|||
### Dynamic Navigation Objects |
|||
A dynamic navigation object is an object which affects the state of the navigation mesh such as a door which can be opened or closed. |
|||
To create a dynamic navigation object add a NavMeshObstacle to it and configure the shape (in most cases this should just match the corresponding collider). Then add a DynamicNavObstacle component to it. |
|||
|
|||
## Player Hierarchy |
|||
|
|||
The `Player Prefab` field inside of Boss Room's `NetworkManager` is populated with `PersistentPlayer` prefab. Netcode will spawn a PersistentPlayer per client connection, with the client designated as the owner of the prefab instance. All `Player Prefab` prefab instances will be migrated between scenes internally by Netcode's scene management, therefore it is not necessary to mark this object as a `DontDestroyOnLoad` object. This object is suitable for storing data, in some cases in the form of `NetworkVariable`s, that could be accessed across scenes (eg. name, avatar GUID, etc). PersistentPlayer's GameObject hierarchy is quite trivial as it is comprised of only one GameObject: |
|||
|
|||
* PersistentPlayer: a `NetworkObject` that will not be destroyed between scenes |
|||
|
|||
####CharSelect Scene |
|||
Inside `CharSelect` scene, clients select from 8 possible avatar classes, and that selection is stored inside PersistentPlayer's `NetworkAvatarGuidState`. |
|||
|
|||
####BossRoom Scene |
|||
Inside `BossRoom` scene, `ServerBossRoomState` spawns a `PlayerAvatar` per PersistentPlayer present. This `PlayerAvatar` prefab instance, that is owned by the corresponding connected client, is destroyed by Netcode when a scene load occurs (either to `PostGame` scene, or back to `MainMenu` scene), or through client disconnection. |
|||
|
|||
`ClientAvatarGuidHandler`, a `NetworkBehaviour` component residing on the `PlayerAvatar` prefab instance will fetch the validated avatar GUID from `NetworkAvatarGuidState`, and spawn a local, non-networked graphics GameObject corresponding to the avatar GUID. This GameObject is childed to PlayerAvatar's `PlayerGraphics` child GameObject. |
|||
|
|||
Once initialized successfully, the in-game PlayerAvatar GameObject hierarchy inside `BossRoom` scene will look something like (in the case of a selected Archer Boy class): |
|||
|
|||
* Player Avatar: a `NetworkObject` that *will* be destroyed when `BossRoom` scene is unloaded |
|||
* Player Graphics: a child GameObject containing `NetworkAnimator` component responsible for replicating animations invoked on the server |
|||
* PlayerGraphics_Archer_Boy: a purely graphical representation of the selected avatar class |
|
|||
# Changelog |
|||
|
|||
All notable changes to this project will be documented in this file. |
|||
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
|||
|
|||
Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com). |
|||
|
|||
## [Unreleased] - yyyy-mm-dd |
|||
|
|||
### Added |
|||
* Dedicated Server Mode (#696) - This PR adds the new flows necessary for boss room to start a dedicated server. Please read PR for more details. |
|||
* |
|||
### Changed |
|||
* Updated tools, authentication and relay packages (#690) |
|||
* Replaced our dependency injection solution with VContainer. (#679) |
|||
* Refactored connection management into simpler state machine (#666) |
|||
* |
|||
### Removed |
|||
* |
|||
### Fixed |
|||
* Subscribing to a message channel while unsubscribing is pending (#675) |
|||
|
|||
## [v1.3.0-pre] - 2022-06-23 |
|||
|
|||
### Added |
|||
* Adding RNSM (Runtime Network Stats Monitor) to boss room [MTT-3267] (#621) |
|||
* Other players loading progress in loading screen [MTT-2239] (#580) |
|||
* Auto reconnect [MTT-2617] (#611) |
|||
* Bumping relay version so we now have auto region selection (with the QoS package). This allows selecting the right relay region instead of the default us-central and should reduce latency for non-central folks. (#657) |
|||
* Bad network conditions warning [MTT-3242] (#632) |
|||
* Added basis for automated testing and CI (#484) (#487) (#639) |
|||
* Connection feedback + IP connection window [MTT-2315] [MTT-3234] (#613) |
|||
* First import of all the vandal imp artwork (#637) |
|||
* Updated boss room's root scene to automatically load child scenes at editor time (#653) |
|||
* Users can change profile in-game in addition to the -AuthProfile command line argument (#636) |
|||
* NetworkRigidbody-based toss Action, thrown by new VandalImp class [MTT-2333](#671) |
|||
|
|||
### Changed |
|||
* Bump NGO to pre.10 (#678) --> Fix in Boss Room related to the connection approval breaking change. Removing useless ForceNetworkSerializeByMemcpy for player names. |
|||
* Bump Boss Room to Unity 2021 [MTT-3022] (#620) |
|||
* Remove initial ugs popup [MTT-3563] (#650) --> Users who do not use UGS will no longer receive a popup when starting the application telling them how to set it up. It is replaced with a tooltip that appears when hovering on the "Start with Lobby" button with the cursor. |
|||
* Folders and assemblies refactor MTT-2623, MTT-2615 (#628)(#668)(#669)(#673)(#674) |
|||
* Docs: Readme Image Updates (#680) |
|||
|
|||
### Removed |
|||
* Remove UNET [MTT-3435] (#638) --> removed deprecated UNET transport from Boss Room |
|||
|
|||
## [1.2.0-pre] - 2022-04-28 |
|||
### Changes |
|||
* Bump to pre.8 and fix compile issues [MTT-3413] (#631) --> Custom message structs now need new interfaces |
|||
* Client network transform move to samples [MTT-3406] (#629) --> You can now use Boss Room's Utilities package to import ClientNetworkTransform using this line in your manifest file |
|||
`"com.unity.multiplayer.samples.coop": "https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git?path=/Packages/com.unity.multiplayer.samples.coop",` |
|||
* In-game message feed [MTT-2678] [MTT-2318] (#601) --> Displays in-game events, including networked events |
|||
* Networked message channel (#605) --> To support message feed |
|||
|
|||
### Dependencies |
|||
* "com.unity.netcode.gameobjects": "1.0.0-pre.8", |
|||
* "com.unity.services.authentication": "1.0.0-pre.4", |
|||
* "com.unity.multiplayer.tools": "1.0.0-pre.6", |
|||
* "com.unity.services.lobby": "1.0.0-pre.6", |
|||
* "com.unity.services.relay": "1.0.1-pre.5", |
|||
* "com.veriorpies.parrelsync": "https://github.com/VeriorPies/ParrelSync.git?path=/ParrelSync#bb3d5067e49e403d8b8ba15c036d313b4dd2c696", |
|||
* Editor is 2020.3.33f1 |
|||
|
|||
### Fixes: |
|||
* Fixed Z Fighting of Floor Tiles Near Edge of Main Boss Room (#616) |
|||
* SceneBootstrapper detects and allows TestRunner launches (#483) |
|||
* Removed feature to set all players unready in char select when a player leaves or joins (#625) |
|||
* Removed setting disconnect reason to UserRequested on clients entering post-game (#626) |
|||
* Disallowing portait orientation for auto rotation (#627) |
|||
* Chore: removing QoS (#623) --> waiting for official release |
|||
|
|||
## [1.1.2-pre] - 2022-04-14 |
|||
### Fixes |
|||
|
|||
* Readme and projectID-monitoring popup tweaks (#618) |
|||
|
|||
## [1.1.1-pre] - 2022-04-13 |
|||
### Changes |
|||
* **Adding relay auto region selection using the QoS package #617 --> this should reduce ping times for people not in us-central** |
|||
* Loading screen (#427) |
|||
* Added popup that tells users to set up project id if it's not set up [MTT-3265][MTT-3237] (#607) |
|||
* Message to clients when host ends game session intentionally [MTT-3202] (#594) |
|||
|
|||
### Dependencies |
|||
* "com.unity.netcode.gameobjects": "1.0.0-pre.7", |
|||
* "com.unity.services.authentication": "1.0.0-pre.4", |
|||
* "com.unity.multiplayer.tools": "1.0.0-pre.6", |
|||
* "com.unity.services.lobby": "1.0.0-pre.6", |
|||
* "com.unity.services.relay": "1.0.1-pre.5", |
|||
* "com.veriorpies.parrelsync": "https://github.com/VeriorPies/ParrelSync.git?path=/ParrelSync#bb3d5067e49e403d8b8ba15c036d313b4dd2c696", |
|||
* Editor is 2020.3.33f1 |
|||
|
|||
### Fixes: |
|||
* Alpha4 input press opens emote drawer (#599) |
|||
* Add Unity Gaming Services info to readmes [MTT-3263] (#608) |
|||
* General Project Clean Up, Reduction of Import Times, Minor Material Bug MTT-2737] [MTT-3116] (#606) |
|||
* Only server finds navigation object, asserts refactored [MTT-3248] (#602) |
|||
* Relogin when auth token is stale [MTT-3253] (#604) |
|||
* Scene loading issue when shutting down [MTT-2828] (#610) |
|||
* Silencing errors that are not errors [MTT-2930] [MTT-3249] (#597) |
|||
* Chore: bump to latest tools version, so we get the awesome new perf improvements (#614) |
|||
* Chore: bumping package version and cleaning up dependencies for boss room package (#600) |
|||
* Chore: upgrade to 2020.3.33f1 (#615) |
|||
|
|||
## [1.1.0-pre] - 2022-04-07 |
|||
### Changes |
|||
* Adding Lobby service integration and removing Photon (#480) (#567) (#486) (#547) (#585) (#525) (#566) (#511) (#494) (#506) (#510) (#526) (#595) (#551) (#556) (#515) (#553) (#544) (#522) (#524) (#539) (#565) (#550) (#592) (#505) (#518) (#596)) |
|||
* Adding separate IP window button after lobby integration (#538) (#502) |
|||
* Bumping NGO to pre.7 and removing now redundant UTP dependency [MTT-3235] (#598) |
|||
* Flag to prevent dev and release builds to connect (#482) |
|||
* Replacing guid with auth playerid for session management (#488) |
|||
* Using DTLS for relay (#485) |
|||
* Adding new cheats (#446): heal player (#448), kill enemies (#447), portals toggle (#452), speedhack toggle (#449), teleport mode (#450), toggle door (#451) |
|||
* Adding transport RTT to UI stats and using exponential moving average for calculations (#528) |
|||
* Boss and run VFX Optimizations (#514) |
|||
* Made a shared menu camera prefab for all of the menu scenes and swapped out the old cameras in the scenes for it (#473) |
|||
* Player architecture ARCHITECTURE.md addition (#476) |
|||
|
|||
### Dependencies |
|||
* "com.unity.netcode.gameobjects": "1.0.0-pre.7", |
|||
* "com.unity.services.authentication": "1.0.0-pre.4", |
|||
* "com.unity.multiplayer.tools": "1.0.0-pre.2", |
|||
* "com.unity.services.lobby": "1.0.0-pre.6", |
|||
* "com.unity.services.relay": "1.0.1-pre.5", |
|||
* "com.veriorpies.parrelsync": "https://github.com/VeriorPies/ParrelSync.git?path=/ParrelSync#bb3d5067e49e403d8b8ba15c036d313b4dd2c696", |
|||
* Editor is 2020.3.27f1 |
|||
|
|||
### Fixes: |
|||
* Better flows for authentication, generate unique Profile ID on clone project (#577) |
|||
* Fixing imps self-destroying on clients when late-joining with multiple additive scenes loaded (#574) |
|||
* Fixing send queue error (#496) |
|||
* Fixing connecting while starting game (#481) |
|||
* Dead player not dead when reconnecting [MTT-2965] (#583) |
|||
* Null refs when quitting (#563) (#572) |
|||
* Better environment layer pathing [MTT-2412], [MTT-2830], [MTT-1990] (#576) |
|||
* Simpler quitting flow (#579) |
|||
* Adjusted layer collision matrix, removing collision with column pieces (#541) |
|||
* Arrow not sending a clientrpc when despawned, vfx get reset on spawn/despawn (#557) (#560) |
|||
* Client writing to netvar error (#468) |
|||
* Darker Eyebrows for Player Characters (#555) |
|||
* Decoupling SessionManager from NetworkManager [MTT-2603] (#581) |
|||
* Filled in some holes in the floor (#527) |
|||
* Leavebeforequit coroutine not starting (#589) |
|||
* Mage FX graphics not offset (#571) (#575) |
|||
* NetworkAnimator being called on clients (#512) (#529) |
|||
* NREs when trying to quit (#516) (#531) |
|||
* OnNetworkDespawn added to ServerProjectileLogic to prevent unspawned RPCs (#593) |
|||
* Refactor of click target feedback (#569) |
|||
* Same player number for multiple players in second playthrough (#490) (#498) |
|||
* Setting to 120hz refresh rate so it doesn't influence RTT too much, but still shaves off about 1/3 of CPU usage when running 2 builds on the same machine (#573) |
|||
* Simplified Floor Tiles (#507) |
|||
* Small CPU performance improvements (#590) |
|||
* Switched out the shadow mesh from a plane to a quad :) also turned off collision and shadow casting! (#586) |
|||
* Type and rtt text is now TextMeshPro and sized properly (#559) (#561) |
|||
* Unready button not clickable on wide screens (#552) |
|||
* Updating only navmesh generated (#542) (#546) |
|||
* Username changing before game (#499) (#530) |
|||
* VFX Optimization Pass (#584) |
|||
* Blocking pass (#578) |
|||
* React animation on trample attack while fainted (#478) |
|||
|
|||
### Known issues: |
|||
* Dead imps spawn as if still alive for clients who join late |
|||
* Wrong anticipation animations played on client |
|||
* When reconnecting, the player has a big teleport to it's old position |
|||
* Proper-Fix: Retrieve Lobby list hit the rate limit. Will try again soon... error spam |
|||
* improve auth flow, it's not clear at the moment how to run two players locally |
|||
* Disconnecting wifi client side couldn’t reconnect |
|||
* "Service Error - Cannot resolve destination host" when attempting to reconnect |
|||
* Received "No client guid found mapped to the given client ID" when leaving game |
|||
* Remove workaround for wait to disconnect |
|||
* NotServerException: Destroy a spawned NetworkObject on a non-host client is not valid. Call Destroy or Despawn on the server/host instead - thrown when a host joins Lobby as a client |
|||
* When start host fails, we shouldn't go to char select screen |
|||
* heal not consistent, sometimes will not see health bar move |
|||
* additive scene loading produces some lag in editor |
|||
* Bringing up cheats screen on touchscreens should not invoke any game-side actions |
|||
* Idling in Lobby Join window causes a curl error from Lobby Services |
|||
* PlayerGraphics_Rogue_Boy(Clone) doesn't have enough AudioSources to loop all desired sound effects. (Have 2, need at least 1 more) spams console |
|||
* Android UI/Click issues |
|||
* Fix environment material on lowest setting for android |
|||
* [Connection] UI feedback on hosting and joining |
|||
* Emote drawer is not opened when 4 is pressed on keyboard |
|||
* Controls modal does not scale with the window |
|||
* Walk is triggered when trying to hit emotes on mobile |
|||
* Late join clients have green names |
|||
|
|||
## [1.0.2-pre] - 2022-02-09 |
|||
### Changes |
|||
* New session manager to allow reconnection (#361) |
|||
* Min spec Android setup for Boss Room (#429) |
|||
* Additive scene loading (#425) |
|||
* Cancel during join or host (#428) |
|||
* Disconnect/quit button (#432) |
|||
* Boss Room actions are all now faster with game design tweaks (#436) |
|||
* Update to NGO 1.0.0-pre.5 (#456) |
|||
* Adding on screen warning when using simulated latency (#412) |
|||
* Button to copy room name to clipboard (#431) |
|||
* Character run smoke particle optimization (#426) |
|||
* Cheat window (#444) |
|||
* God mode cheat (#430) |
|||
* Player hierarchy QoL updates, anim event listener added for player anim events (#411) |
|||
|
|||
### Dependencies |
|||
* “com.unity.services.relay”: “1.0.1-pre.4", |
|||
* “com.unity.netcode.gameobjects”: “1.0.0-pre.5", |
|||
* “com.unity.netcode.adapter.utp”: “1.0.0-pre.5", |
|||
* “com.unity.multiplayer.tools”: “1.0.0-pre.2", |
|||
* “com.unity.transport”: “1.0.0-pre.12", |
|||
* Photon Realtime v4.1.6.0 |
|||
* Editor is 2020.3.27f1 |
|||
|
|||
### Fixes |
|||
* Added transition between “Action - Boss Trample” and “(Trample Stop)” (#437) |
|||
* Cannot host a game after having previously played as a client (#457) |
|||
* Cheat window toggling on mobile |
|||
* Hitpoint depletion inconsistency with clamped values (#454) |
|||
* Host name not showing (#442) |
|||
* Improving UI during connection flow (#415) |
|||
* Join code not displayed for clients using Unity Relay (#433) |
|||
* Re-enabling positional smoothing on graphics GameObject (#417) |
|||
* Removing workaround for NGO issue 745 (#419) |
|||
* Smooth host movement cleanup (#439) |
|||
* Reduced default master volume value (#445) |
|||
* Removed room name textbox when using IP-based connection (#418) |
|||
* Removed the !IsConnectedClient condition for handling client disconnect (#435) |
|||
* Replaced instance of PostGameState prefab inside PostGame scene to fix malformed GlobalObjectIdHash (#443) |
|||
* Fix/randomly rotate breakable pots #472 |
|||
* Deleted an overlapping object #471 |
|||
* Fix: Background missing in Post Game scene #470 |
|||
* Fixed a broken material ref on boss pillars #469 |
|||
* Dotnet format over solution based on project’s .editorconfig file (#465) |
|||
* Deleted a pot that was overlapping with a torch in the transition area prefab (#471) |
|||
* Rotated breakable pots in random directions so they don’t look so copy pasted (#472) |
|||
|
|||
### Chore |
|||
* Updated Relay to latest (#474) |
|||
* Updated IET package version to 2.1.1 (#422) |
|||
* Bumped Unity LTS version (#396) |
|||
|
|||
### Known Issues |
|||
* NetworkTransform overflow exception |
|||
* Successive game sessions may cause a duplication of in-scene placed NetworkObjects |
|||
* Photon get increasing RTT when too much bandwidth |
|||
* When joining w/ photon relay, text should display “”Join code”" and not “”IP host”" |
|||
* Client needs a reboot to join a match after a previous game using photon |
|||
* Have better error message when getting rate limited by Relay |
|||
* Possible to get phantom players in Boss Room, we were 6 players, but got 8 players in the char select (hard to repro) |
|||
* In-scene placed imps not spawning on clients when late-joining with multiple additive scenes loaded |
|||
* Additive scene loading produces a CPU spike |
|||
* Rare client can’t write to NetVar error with additive scene loading and late join |
|||
* High latency (1 sec RTT) will produce null ref after char select |
|||
* When start host fails, we shouldn’t go to char select screen |
|||
* Dead imps spawn as if still alive for clients who join late |
|||
* When reconnecting, the player has a big teleport to it’s old position |
|||
* Rogue can teleport to top of column |
|||
* Bringing up cheats screen on touchscreens should not invoke any game-side actions |
|||
* Join with Unity Relay with empty join code throws exception |
|||
* heal not consistent, sometimes will not see health bar move |
|||
* Null ref in UnityEngine.Camera.WorldToScreenPoint (and other?) |
|||
* Wrong anticipation animations played on client |
|||
* With high lag, camera jitter was observed when rotating |
|||
* While running, character plays hit react animation but doesn’t get HP decrease |
|||
* Game can be initiated while a second player is connecting to host in CharSelect |
|||
* Rogue looks like it’s still dashing after teleport |
|||
* Top of door shouldn’t be clickable/traversable |
|||
|
|||
## [1.0.1-pre] - 2021-11-18 |
|||
|
|||
### Changes |
|||
|
|||
* Updated to NGO-pre.3 (#400) |
|||
* Updated Photon version (#402) |
|||
* Ported the game to URP (#371) |
|||
* Updated to Unity 2020.3.21f1 (#396) |
|||
* Updated Boss Room banner image (#393) |
|||
* Small update to platform support on the readme (#391) |
|||
* Replace MLAPI references with NGO (#410) |
|||
* Adding utilities asmdef. (#404) |
|||
* Visual improvements: |
|||
* Touched up the character select background prefab (#416) |
|||
* A matte around the border of the map to block the camera from seeing lava, edges of meshes, particles, etc |
|||
* Lighting changes and optimizations |
|||
* Reduced number of realtime lights to 4 (from 27) |
|||
* Baked 3x1024 and 1x128 lightmaps (about 4MB), these are for area lights to make the lava glow more convincing |
|||
* Added little blob shadows to characters (a plane with a transparent soft black circle attached to the physics object in the character prefab) |
|||
* Changed the lights for the enemy spawners from point lights to spot lights (still not shadow casting) |
|||
* Rotated all of the little pots to be in different directions so they don't look so copy-pasted |
|||
* Tightened radii of the torch lights and reduced the amount of realtime lights for each torch from 2 to 1 |
|||
* Also added a couple of extra torches |
|||
* Upped the contrast and adjusted the ambient lighting of the scene to be a more saturated blue |
|||
|
|||
### Fixes |
|||
|
|||
* Fixed pathfinding issues with doors (#407) |
|||
* NGO-pre.3 asset fixes for NetworkAnimator (#400) |
|||
* Invincibility counter reset on cancel, animator invincibility parameter reset (#409) |
|||
* Changed ready button text to UNREADY when player is locked in (#413) |
|||
* Fixed arrows despawning error while switching scenes (#406) |
|||
* Fixed a bug involving the NetworkObjectPool's GlobalObjectIdHash (#405) |
|||
* Fixed missing Boss Room title in the main menu screen for mac builds (same fix as before, but this time for the URP version of the main menu) (#403) |
|||
* NGO-pre.3 asset fixes for NetworkAnimator (#400) |
|||
* Fixed arrows not spawning on second playthrough on client side (#394) |
|||
|
|||
## [1.0.0-pre] - 2021-10-21 |
|||
|
|||
v1.0.0-pre is a pre-release release for Multiplayer Samples Co-op. |
|||
|
|||
It requires and supports Unity v2020.3 LTS and Netcode for GameObjects (Netcode) v1.0.0-pre. For additional information on Netcode, see the changelog and release notes for the Unity Netcode package. |
|||
|
|||
### New features |
|||
|
|||
* Player persistence hierarchical modifications to Netcode's Player Prefab https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/342, https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/349, & |
|||
& https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/356 |
|||
* Radio button introduced for main menu UX improvements (default is still IP) https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/345 |
|||
* Archer's base attack & charged shot 1-3 replicated via `NetworkTransform` https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/353 |
|||
* `NetworkTransform` handles players' movement syncing https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/354 |
|||
* Adding ParrelSync and updating third party notice.md https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/357 |
|||
* `NetworkAnimator` added to boss door & floor switch with server-authority https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/360 |
|||
* Integrating Unity Transport and Relay into Boss Room https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/366 |
|||
* Updated image in the UnityLogo prefab with the new Unity logo https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/374 |
|||
* NetworkObject pool (arrows are pooled) https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/362 |
|||
* Server-authoritative character `NetworkAnimator` https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/367 |
|||
|
|||
### Changes |
|||
|
|||
* Collider and Layer cleanup & optimizations https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/341 |
|||
* Photon Transport send queue batch size incremented to 8192 https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/350 |
|||
* OnNetworkSpawn() refactoring, player prefab removed from NetworkManager prefab list https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/352 |
|||
* Netcode rebranding https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/368 |
|||
* Added link to bitesize samples https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/370 |
|||
* Update compatible Unity version in Readme https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/376 |
|||
* Renaming connection methods in main menu https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/382 |
|||
* Updated Animations to use an additional anticipation animation, to properly work with NetworkAnimator. https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/383 |
|||
* Updated actions to latest NetworkAnimator APIs https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/pull/383 |
|||
|
|||
### Fixes |
|||
|
|||
This release includes the following fixes: |
|||
|
|||
* A Netcode soft sync error on cleanup between scene transitions previously broke the game. For example imps did not spawn and pots were intangible. |
|||
* Sometimes after completing a match and the host starts a new match from the Victory or Loss screen, connected players had no visible interactions to join or select characters. |
|||
* Sometimes the client may have been disconnected from Photon which caused a timeout and `PhotonRealtimeTransport` to be in a bad state after the shutdown. An exception developed that fired every frame. |
|||
|
|||
### Known issues |
|||
|
|||
* The game can be initiated while a second player is connecting to the host in `CharSelect`. Players may join without selected characters spawning and in an unresponsive state. |
|||
* The game may not transition completely into the game scene past the character select screen on lower-end Android devices. |
|||
* This version currently includes a patched NetworkAnimator. This will be reverted back once this patch goes live in Netcode for GameObjects |
|||
|
|||
|
|||
## [0.2.1] - 2021-05-27 |
|||
|
|||
### Fixes |
|||
|
|||
This release includes the following issue fixes: |
|||
- Fixing parameter exception caused by old MLAPI version. Reverting until package is updated. |
|||
|
|||
|
|||
## [0.2.0] - 2021-05-19 |
|||
|
|||
v0.2.0 is an Early Access release for Multiplayer Samples Co-op. |
|||
|
|||
It requires and supports Unity v2020.3.8f1 LTS and Unity MLAPI v0.1.0. For additional information on MLAPI, see the changelog and release notes for the Unity MLAPI package. |
|||
|
|||
### New features |
|||
|
|||
* Introduced static scene `NetworkObject`s to to BossRoom scene including the following updates: |
|||
|
|||
* Implemented a `ScriptableObject` based event system to encapsulate events inside assets. These objects include a `GameEvent` (ScriptableObject) and `GameEventListener` (MonoBehaviour) to encapsulate events inside assets, located in the `ServerBossRoomState` prefab which now has a `GameEventListener` component. The event associated to this listener is `BossDefeated`, which the Boss raises when the `LifeState` is Dead in the `RaiseEventOnLifeChange` component. |
|||
* Added two separator `GameObject`s for scene readability: runtime `NetworkObject`s and `NetworkObject`s already placed in the scene. |
|||
* Added a custom editor for GameEvents to fire in the editor (greatly enhances testing). |
|||
* The `LifeState` NetworkVariable was moved from `NetworkCharacterState` into its own component, `NetworkLifeState`. |
|||
* Cleaned up and removed old spawn prefab collections and spawner scripts (`NetSpawnPoint`). |
|||
|
|||
* Added ramp-up animation for hero movement and actions |
|||
* Added F/X and animation assets for the game including: |
|||
|
|||
* Audio files for boss sound effects |
|||
* Visual effects and particles for Tank charge skill |
|||
* Art assets to wave spawner, including animations for ReceiveDamage, Broken (died), and Revive |
|||
|
|||
* Added Boss fight theme. |
|||
* Updated and added various hero abilities: |
|||
|
|||
* Added a cooldown to Archer's PowerShot. |
|||
* Added the Rogue's Dagger and Dash skills. The dash skill shows an instinct teleport (using an RPC) instead of a charge like the boss' (which updates its position over time). |
|||
* Added the Rogue's Sneak skill using local stealth, applying a graphical effect to the stealthy character while still sending all network events normally. |
|||
* Properly display Heal abilities when targeting a fallen ally character. |
|||
* Character attack actions properly support Hold to charge options. |
|||
|
|||
* To show how UI elements and game objects can be networked, added networked functionality using `INetworkSerializable` in the `CharSelect` screen to network player's selected character on the Character Selection screen. |
|||
* Added input sanitization to remove any invisible characters introduced by other chat programs when copy-pasting room names, IP addresses, or ports. (Useful when sharing with friends.) |
|||
* Added healthbars to display when damaged and properly track imp health locally and across clients. |
|||
|
|||
### Changes |
|||
|
|||
* The Boss Room project now loads MLAPI 0.1.0-experimental package through the Unity Package Manager Registry. See the [MLAPI install guide](https://docs-multiplayer.unity3d.com/docs/migration/install) for details. |
|||
* Updated the user interface including the following: |
|||
|
|||
* When joining a game, a "Connecting..." UI loads. When disconnecting from a game, you are returned to the MainMenuScene with a "Connection to Host lost" message. If the game fails to connect, a general message "Connection to Host failed" loads. |
|||
* Added an option to leave the lobby after joining it. You no longer have to restart the game to leave the lobby. |
|||
* Added option to cancel my selection after clicking **Ready**. |
|||
* Added a gear icon for accessing and modifying app settings. |
|||
* The UI now tracks and displays player has arrived, number of connected players in the lobby, and player status. |
|||
|
|||
* Updated Boss Room per asset and project settings for increased performance and better resource management: |
|||
|
|||
* Disabled GPU Skinning to optimize GPU usage and FPS. |
|||
* Lowered quality of ambient occlusion from high to medium. |
|||
* Switched SMAA High to FXAA (fast mode) reducing GPU cost. |
|||
* Modified GPU Instancing on imps, heroes, and the boss to significantly reduce the number of draw calls. |
|||
* Turned off Cast Shadows on Imp and Imp Boss. |
|||
* Disabled mesh colliders of lava, which is more decorative than interactive. |
|||
* Refactored the S_SimpleDissolve shader which consumed most import time. |
|||
|
|||
* Added disconnection error message to be displayed when a player or host disconnects. Client logic was also updated to detect Host disconnection scenarios, such as losting connectivity. |
|||
* Balanced hero and enemy stats, spawners, trigger areas, and enemy detetction areas. |
|||
* Removed a duplicated `GameObject` from the MainMenu scene. |
|||
* Reviewed and revised code to better following quality standards. |
|||
* Updated the Mage character base attack to better support the new enqueuing ability and handle game behaviors. Updates include: |
|||
|
|||
* Actions being non-blocking now allow other actions while a mage-bolt is in flight |
|||
* Actions send in `ActionSequence` groups to better handle actions when players spam click enemies |
|||
* Timing issues with animations, actions, and character location |
|||
* Bolt animation for legitimate hits |
|||
* Updated attacks not to knock rogues out of stealth |
|||
|
|||
* Updated character attacks to not cause friendly-fire damage between players. |
|||
* Updated and resolved issues with 3D models including polygon count of coins and chest, artifacts where level graphics are stitched together or overlapping characters, and asset map consistency used by objects (color + normal map + emission). |
|||
* Merged `ConnectStatus` and `DisconnectReason` into a single `ConnectStatus`. |
|||
* Updated `ServerGameNetPortal` to properly handle the following: |
|||
|
|||
* Per-connection state on client disconnect |
|||
* Additional errors including a full server and player ID (GUID) already playing |
|||
|
|||
* Refactored Action Bar code including the following: |
|||
|
|||
* Removed the `ButtonID` from `UIHudButton`. |
|||
* Removed hard-coded values from `HeroActionBar`. |
|||
* Removed switch statements. |
|||
* Completed minor code cleanup. |
|||
* Added verification to only show skill and ability buttons for available character abilities. Empty buttons no longer load for characters. |
|||
|
|||
* Added a call to warm up shaders when the project starts to ensure animations issues do not occur. |
|||
* Removed collision from objects that have a Broken (dead) state. |
|||
* Implemented a better cooldown solution and calculations for tracking and managing character, imp, and boss actions. |
|||
* Updated event registration and unregistration code to be symmetrical across the project. |
|||
|
|||
### Fixes |
|||
|
|||
This release includes the following issue fixes: |
|||
|
|||
* Fixed an issue where any player that plays the game and then returns to the Main Menu may be unable to Start or Join properly again, requiring you to restart the client. |
|||
* Updates and refinements in Boss Room resolved an issue that occurred in some degraded network conditions that caused a replicated entity on a client to vanish from that client, creating the effect of being assailed by an invisible enemy. |
|||
* Fixed displayed graphical affects for casting and blocking a Bolt to correctly match the caster and target, and properly stops animations for cancelled actions across clients. |
|||
* Fixed a rare exception when the Tank character uses her Shield Aura ability to intercept the Boss charge attack. |
|||
* Fixed an issue returning all clients to the Main Menu when the host leaves the Boss Room. |
|||
* Green quads no longer show on impact when the Archer arrow strikes enemies. |
|||
* Fixed issue to correctly allow one player to receive a character when two players in the Character Select click **Ready** for the same hero at the same time. Character Select is no longer blocked. |
|||
* Fixed an issue with boss collisions with a Pillar correctly applying a stun effect and shattering the pillar when using the Trample attack. |
|||
* Fixed the lobby welcome messages to correctly list the player names, including a previous issues for P1 and P2. |
|||
* On Windows, investigated and fixed issues with visible effects for character actions including Mage Freeze attack. |
|||
* On Windows, fixed issue with imp spawners not respawning new imps after exploring the room. |
|||
* Fixed an issue where the door state does not reflect the existing state when players connect late to a game, for example if other players open the door and a player joins late the door displays as closed. |
|||
* Removed a previous work-around for character selections when host replays a completed game. The issue was resolved, allowing players to see character selections during replay. |
|||
* Fixed collision wall settings, fixing an issues where the boss knock-back ability sent players through walls. |
|||
* Resolved an issue where any players leaving the lobby sent all players to the lobby. |
|||
* Fixed the ignored health amount (HP parameter) for revived characters. The correct value correctly sets the revived character to a lower amount than maximum. |
|||
* Fixed animations for enemies including the smoke animation for destroyed imps and the boss helmet when crying. |
|||
* Fixed loading of the game skybox before the menu loaded. |
|||
|
|||
### Known issues |
|||
|
|||
* An MLAPI soft sync error on cleanup between scene transitions may break the game, for example imps do not spawn and pots are intangible. |
|||
* The game can be initiated while a second player is connecting to the host in `CharSelect`. Players may join without selected characters spawning and in an unresponsive state. |
|||
* Sometimes after completing a match and the host starts a new match from the Victory or Loss screen, connected players may have no visible interactions to join or select characters. A work-around is implemented to not block entry into the game. |
|||
* Sometimes the client may be disconnected from Photon which causes a timeout and `PhotonRealtimeTransport` to be in a bad state after the shutdown. An exception is developed that fires every frame. |
|||
|
|||
|
|||
## [0.1.2] - 2021-04-23 |
|||
|
|||
v0.1.2 is a hotfix for an Early Access release for Boss Room: Small Scale Co-op Sample. |
|||
|
|||
### Updates |
|||
|
|||
* License updated to [Unity Companion License (UCL)](https://unity3d.com/legal/licenses/unity_companion_license) for Unity-dependent projects. See LICENSE in package for details. |
|||
* The GitHub repository `master` branch has been renamed to `main`. If you have local clones of the repository, you may need to perform the following steps or reclone the repo: |
|||
|
|||
``` |
|||
# Switch to the "master" branch: |
|||
$ git checkout master |
|||
# Rename it to "main": |
|||
$ git branch -m master main |
|||
# Get the latest commits (and branches!) from the remote: |
|||
$ git fetch |
|||
# Remove the existing tracking connection with "origin/master": |
|||
$ git branch --unset-upstream |
|||
# Create a new tracking connection with the new "origin/main" branch: |
|||
$ git branch -u origin/main |
|||
``` |
|||
|
|||
## [0.1.1] - 2021-04-09 |
|||
|
|||
### Fix |
|||
Adding missing 3rd party contributors file |
|||
Fixing wrong code/comment about NetworkVariableBool not working (that's not the case!) |
|||
|
|||
## [0.1.0] - 2021-04-07 |
|||
|
|||
v0.1.0 is an Early Access release for Multiplayer Samples Co-op. |
|||
|
|||
It requires and supports Unity v2020.3 and later and Unity MLAPI v0.1.0. For additional information on MLAPI, see the changelog and release notes for the Unity MLAPI package. |
|||
|
|||
### New features |
|||
|
|||
Boss Room is a small-scale cooperative game sample project built on top of the new experimental netcode library. The release provides example code, assets, and integrations to explore the concepts and patterns behind a multiplayer game flow. It supports up to 8 players for testing multiplayer functionality. |
|||
|
|||
* See the README for installation instructions, available in the downloaded [release](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/releases/latest) and [GitHub](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop). |
|||
* Learn with Unity using the Boss Room source code, project files, and assets which include: 1 populated dungeon level, 4 character classes with 2 genders, combatant imps and boss, and a simple collaborative puzzle. |
|||
* Test co-op games by running multiple instances of the game locally or connecting to a friend over the internet. |
|||
|
|||
### Known issues |
|||
|
|||
* Sometimes when the host leaves the Boss Room, not all clients will return to the Main Menu, but will remain stuck in the Boss Room scene. |
|||
* Sometimes after completing a match and the host starts a new match from the Victory or Loss screen, connected players may have no visible interactions to join or select characters. |
|||
* A player may encounter a rare exception when the Tank character uses her Shield Aura ability. This issue may be due to intercepting the Boss charge attack. |
|||
* If two players in the Character Select **Ready** for the same hero at the same time, the UI will update to *Readied* on both clients, but only one will have actually selected the hero on the Host. This issue blocks Character Select from proceeding. |
|||
* Any player that plays the game and then returns to the Main Menu may be unable to Start or Join properly again, requiring you to restart the client. |
|||
* Green quads may show on impact when the Archer arrow strikes enemies. This issue may only occur in the editor. |
|||
* You may encounter a game error due to a Unity MLAPI exception. Not all MLAPI exceptions are fully exposed few informing users. |
|||
* The Photon Transport currently generates some errors in the Player log related to the `PhotonCryptoPlugin`. |
|||
* The welcome player message in the lobby indicates P2 (player 2) regardless of your generated name. Currently the Character Select scene displays “Player1” and “P1” in two locations, where it is intended that the user’s name be displayed. |
|||
* The spawner portal does not work in this release. |
|||
* Players may not reliably play another match when selecting **Return to Main Menu** during the post-game scene. This may be due to states not properly clearing. |
|||
* Some actions may feel unresponsive and require action anticipation animations. |
|||
* In some degraded network conditions, a replicated entity on a client can vanish from that client, creating the effect of being assailed by an invisible enemy. |
|||
* Boss collisions with a Pillar may not correctly apply a stun effect and shatter the pillar when using the Trample attack. |
|||
* The displayed graphical affects for casting and blocking a Bolt do not correctly match the caster and target. |
|||
* Some areas of the Boss Room require updates to geometry seams and collisions, for short walls and lava pits. |
|
|||
The Boss Room repository follows the same code of conduct as the Netcode for GameObjects (Netcode) repository. Please read the [Netcode code of conduct](https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/blob/master/CODE_OF_CONDUCT.md), thank you! |
|
|||
# Contributing |
|||
|
|||
Thank you for your interest in contributing to BossRoom! |
|||
|
|||
Here are our guidelines for contributing: |
|||
|
|||
* [Code of Conduct](#coc) |
|||
* [Ways to Contribute](#ways) |
|||
* [Issues and Bugs](#issue) |
|||
* [Feature Requests](#feature) |
|||
* [Improving Documentation](#docs) |
|||
* [Unity Contribution Agreement](#cla) |
|||
* [Pull Request Submission Guidelines](#submit-pr) |
|||
|
|||
## <a name="coc"></a> Code of Conduct |
|||
|
|||
Please help us keep BossRoom open and inclusive. Read and follow our [Code of Conduct](CODE_OF_CONDUCT.md). |
|||
|
|||
## <a name="ways"></a> Ways to Contribute |
|||
|
|||
There are many ways in which you can contribute to the BossRoom. |
|||
|
|||
### <a name="issue"></a> Issues and Bugs |
|||
|
|||
If you find a bug in the source code, you can help us by submitting an issue to our |
|||
GitHub Repository. Even better, you can submit a Pull Request with a fix. |
|||
|
|||
### <a name="feature"></a> Feature Requests |
|||
|
|||
You can request a new feature by submitting an issue to our GitHub Repository. |
|||
|
|||
If you would like to implement a new feature then consider what kind of change it is: |
|||
|
|||
* **Major Changes** that you wish to contribute to the project should be discussed first with other developers. We will have a more formal process for this soon. For now submit your ideas as an issue. |
|||
|
|||
* **Small Changes** can be directly submitted to the GitHub Repository |
|||
as a Pull Request. See the section about [Pull Request Submission Guidelines](#submit-pr). |
|||
|
|||
### <a name="docs"></a> Documentation |
|||
|
|||
We accept changes and improvements to our documentation through the [Netcode for GameObjects Documentation repo](https://github.com/Unity-Technologies/com.unity.multiplayer.docs). |
|||
|
|||
## <a name="cla"></a> Contributor License Agreements |
|||
|
|||
When you open a pull request, you will be asked to enter into Unity's License Agreement which is based on The Apache Software Foundation's contribution agreement. We allow both individual contributions and contributions made on behalf of companies. We use an open source tool called CLA assistant. If you have any questions on our CLA, please submit an issue |
|||
|
|||
## <a name="submit-pr"></a> Pull Request Submission Guidelines |
|||
|
|||
We use the [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) for the development of BossRoom. This means development happens on the **develop branch** and Pull Requests should be submited to it. |
|||
|
|||
### Commit Message Guidelines |
|||
Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: |
|||
|
|||
$ git commit -m "A brief summary of the commit |
|||
> |
|||
> A paragraph describing what changed and its impact." |
|||
|
|||
### Line Endings Guidelines |
|||
The project is using Unix-style line endings. |
|||
|
|||
Follow the instructions in the official [Git Configuration](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration) documentation, the [Formatting and Whitespace](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_formatting_and_whitespace) section, to enable `autocrlf` setting on your machine. |
|
|||
Boss Room: Small Scale Co-op Sample © 2021 Unity Technologies |
|||
|
|||
Licensed under the Unity Companion License for Unity-dependent projects (see https://unity3d.com/legal/licenses/unity_companion_license). |
|||
|
|||
Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. |
|
|||
![Banner](Documentation/Images/Banner.png) |
|||
# Boss Room - Co-op multiplayer RPG built with Unity Netcode for GameObjects |
|||
|
|||
| Solutions architects are available on [Discord](https://discord.gg/mNgM2XRDpb) and [forums](https://forum.unity.com/forums/multiplayer.26/) to help you work through issues you may encounter when using Boss Room. | |
|||
| -- | |
|||
|
|||
Boss Room is a fully functional co-op multiplayer RPG made with Unity Netcode. It is built to serve as an educational sample that showcases certain typical gameplay [patterns](https://docs-multiplayer.unity3d.com/netcode/current/learn/bossroom-examples/bossroom-actions) that are frequently featured in similar networked games. |
|||
|
|||
You can use everything in this project as a starting point or as bits and pieces in your own Unity games. The project is licensed under the Unity Companion License. See [LICENSE.md](LICENSE.md) for more legal information. |
|||
|
|||
See [ART_NOTES.md](Documentation/ART_NOTES.md) for more information on the art of Boss Room. |
|||
|
|||
> __IMPORTANT__: |
|||
> - Boss Room has been developed and tested on these Platforms (Windows, Mac, iOS, and Android). |
|||
> - Tested on iPhone 6 and Pixel 3. |
|||
> - Boss Room is compatible with the latest Unity LTS version. |
|||
> - Make sure to include standalone support for Windows/Mac in your installation. |
|||
|
|||
![](Documentation/Images/Boss.png) |
|||
|
|||
![](Documentation/Images/Players.png) |
|||
|
|||
|
|||
## Getting the project |
|||
- The pre-release version can be downloaded from the [Releases](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/releases) page. |
|||
- Alternatively: click the green `Code` button and then choose to download the zip archive. Remember, that you would download the branch that you are currently viewing in Github. |
|||
- For Windows users: Using Windows' built-in extracting tool may generate a "Error 0x80010135: Path too long" error window which can invalidate the extraction process. A workaround for this is to shorten the zip file to a single character (eg. "c.zip") and move it to the shortest path on your computer (most often right at C:\\) and retry. If that solution fails, another workaround is to extract the downloaded zip file using 7zip. |
|||
|
|||
|
|||
## Installing Git LFS to clone locally |
|||
|
|||
This project uses Git Large Files Support (LFS), which ensures all large assets required locally are handled for the project. See [Git LFS installation options](https://github.com/git-lfs/git-lfs/wiki/Installation) for Windows and Mac instructions. |
|||
|
|||
## Registering the project with Unity Gaming Services (UGS) |
|||
|
|||
This project leverages several services from UGS to facilitate connectivity between players. In order to use these services inside your project, one must first [create an organization](https://support.unity.com/hc/en-us/articles/208592876-How-do-I-create-a-new-Organization-) inside Unity Dashboard, and enable both the [Relay](https://docs.unity.com/relay/get-started.html) and [Lobby](https://docs.unity.com/lobby/game-lobby-sample.html) services. Otherwise, Boss Room can still be used without UGS. |
|||
|
|||
## Opening the project for the first time |
|||
|
|||
Once you have downloaded the project, the steps below should get you up and running: |
|||
- Make sure you have installed the version of Unity that is listed above in the prerequisites section. |
|||
- Make sure to include standalone support for Windows/Mac in your installation. |
|||
- Add the project in _Unity Hub_ by clicking on **Add** button and pointing it to the root folder of the downloaded project. |
|||
- The first time you open the project Unity will import all assets, which will take longer than usual - it is normal. |
|||
- Once the editor is ready, navigate to the _Project_ window and open the _Project/Startup_ scene. |
|||
![](Documentation/Images/StartupScene.png) |
|||
- From there you can click the **Play** button. You can host a new game or join an existing game using the in-game UI. |
|||
|
|||
## Testing multiplayer |
|||
|
|||
In order to see the multiplayer functionality in action we can either run multiple instances of the game locally on your computer, using either ParrelSync or builds or choose to connect to a friend over the internet. See [how to test](https://docs-multiplayer.unity3d.com/netcode/current/tutorials/testing/testing_locally) for more info. |
|||
|
|||
--------------- |
|||
**Local multiplayer setup** |
|||
|
|||
First we need to build an executable. |
|||
|
|||
To build an executable, press _File/Build Settings_ in the menu bar, and then press **Build**. |
|||
![](Documentation/Images/BuildProject.png) |
|||
|
|||
Once the build has completed you can launch several instances of the built executable in order to both host and join a game. |
|||
|
|||
> Mac users: to run multiple instances of the same app, you need to use the command line. |
|||
> Run `open -n BossRoom.app` |
|||
|
|||
--------------- |
|||
**Multiplayer over internet** |
|||
|
|||
To play over internet, we need to build an executable that is shared between all players. See the previous section. |
|||
|
|||
It is possible to connect between multiple instances of the same executable OR between executables and the editor that produced said executable. |
|||
|
|||
Running the game over internet currently requires setting up a relay. Boss Room provides an integration with [Unity Relay](https://docs-multiplayer.unity3d.com/netcode/current/relay/relay). |
|||
|
|||
> Checkout our Unity Relay setup guide [here](https://docs-multiplayer.unity3d.com/netcode/current/relay/relay) |
|||
|
|||
Alternatively you can use Port Forwarding. The https://portforward.com/ site has guides on how to enable port forwarding on a huge number of routers. Boss Room uses `UDP` and needs a `9998` external port to be open. Make sure your host's address listens on 0.0.0.0 (127.0.0.1 is for local development only). |
|||
|
|||
--------------- |
|||
### Dedicated Server |
|||
|
|||
Boss Room has a dedicated server mode, allowing you to use it as a headless server with no player running on it. To run it: |
|||
|
|||
Local testing |
|||
1. Switch your editor to the **Dedicated Server** build target. |
|||
2. Hit play. Boss Room will bypass the main menu and enter directly the character select scene and wait for players. |
|||
3. On a clone or build, connect your client to 127.0.0.1 with default port. |
|||
|
|||
A build can be uploaded to a dedicated server hosting provider (for example [Multiplay](https://unity.com/products/multiplay)). |
|||
On Multiplay, please use these launch parameters: ```-port=$$port$$ -logFile $$server_log_dir$$/Engine.log``` |
|||
|
|||
For more info on dedicated servers and why you'd want to use this, see our docs site! |
|||
<!--TODO link to DGS doc page --> |
|||
|
|||
------------------------------------------ |
|||
|
|||
## Exploring the project |
|||
BossRoom is an eight-player co-op RPG game experience, where players collaborate to take down some minions, and then a boss. Players can select between classes that each have skills with didactically interesting networking characteristics. Control model is click-to-move, with skills triggered by mouse button or hotkey. |
|||
|
|||
One of the eight clients acts as the host/server. That client will use a compositional approach so that its entities have both server and client components. |
|||
|
|||
The game is server-authoritative, with latency-masking animations. Position updates are done through NetworkedVars that sync position, rotation and movement speed. NetworkedVars and Remote Procedure Calls (RPC) endpoints are isolated in a class that is shared between the server and client specialized logic components. All game logic runs in FixedUpdate at 30 Hz, matching our network update rate. |
|||
|
|||
Code is organized into three separate assemblies: **Client**, **Shared** and **Server** which reference each other when appropriate. |
|||
|
|||
For an overview of the project's architecture please check out our [ARCHITECTURE.md](ARCHITECTURE.md). |
|||
|
|||
--------------- |
|||
|
|||
For a deep dive in Unity Netcode and Boss Room, visit our [doc](https://docs-multiplayer.unity3d.com/) and [Unity Multiplayer Resources](https://docs-multiplayer.unity3d.com/netcode/current/learn/introduction) sections. |
|||
|
|||
## Bite-size Samples |
|||
This repository contains a collection of bitesize sample projects and games that showcase different sub-features of NGO. You can review these samples with documentation to understand APIs and features better. |
|||
- [Our various bitesize samples](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.bitesize) |
|||
|
|||
## Contributing |
|||
|
|||
The project uses the `git-flow` branching strategy, as such: |
|||
- `develop` branch contains all active development |
|||
- `main` branch contains release versions |
|||
|
|||
To get the project on your machine you need to clone the repository from GitHub using the following command-line command: |
|||
``` |
|||
git clone https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git |
|||
``` |
|||
|
|||
> __IMPORTANT__: |
|||
> You should have [Git LFS](https://git-lfs.github.com/) installed on your local machine. |
|||
|
|||
Please check out [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on submitting issues and PRs to BossRoom! |
|||
|
|||
For further discussion points and to connect with the team, join us on the Unity Multiplayer Networking Discord Server - Channel #dev-samples |
|||
|
|||
[![Discord](https://img.shields.io/discord/449263083769036810.svg?label=discord&logo=discord&color=informational)](https://discord.gg/FM8SE9E) |
|
|||
This package contains third-party software components governed by the license(s) indicated below: |
|||
--------- |
|||
|
|||
Component Name: UnityToonShader |
|||
|
|||
License Type: Unlicense |
|||
|
|||
Copyright owner unknown |
|||
|
|||
https://github.com/IronWarrior/UnityToonShader |
|||
|
|||
This is free and unencumbered software released into the public domain. |
|||
|
|||
Anyone is free to copy, modify, publish, use, compile, sell, or |
|||
distribute this software, either in source code form or as a compiled |
|||
binary, for any purpose, commercial or non-commercial, and by any |
|||
means. |
|||
|
|||
In jurisdictions that recognize copyright laws, the author or authors |
|||
of this software dedicate any and all copyright interest in the |
|||
software to the public domain. We make this dedication for the benefit |
|||
of the public at large and to the detriment of our heirs and |
|||
successors. We intend this dedication to be an overt act of |
|||
relinquishment in perpetuity of all present and future rights to this |
|||
software under copyright law. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
|||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
|||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
|||
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
|||
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
|||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|||
OTHER DEALINGS IN THE SOFTWARE. |
|||
|
|||
For more information, please refer to <http://unlicense.org> |
|||
|
|||
--------- |
|||
Component Name: ParrelSync |
|||
|
|||
License Type: MIT |
|||
|
|||
Copyright (c) 2018 Greg M |
|||
Copyright (c) 2020 Ian and Contributors |
|||
|
|||
https://github.com/VeriorPies/ParrelSync |
|||
|
|||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
|||
|
|||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|||
|
|||
--------- |
|||
Component Name: LiteNetLib |
|||
|
|||
License Type: MIT |
|||
|
|||
Copyright (c) 2021 Unity Technologies |
|||
|
|||
https://github.com/Unity-Technologies/mlapi-community-contributions/tree/main/Transports/com.mlapi.contrib.transport.litenetlib |
|||
|
|||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
|||
|
|||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
|
|||
## Third-Party Contributors |
|||
|
|||
The Boss Room sample game was created by Unity Technologies in partnership with external contributors: |
|||
|
|||
[Storm Flag Games](https://stormflaggames.com) |
|||
|
|||
* Multiplayer Code |
|||
* UI/UX |
|||
* Icon Art |
|||
* Environment Art |
|||
* 3D Characters and Animations |
|||
|
|||
[Jason Hayes Music LLC](https://www.jasonhayesmusic.com/) |
|||
|
|||
* Music and Sound Effects |
|||
|
|||
[Room 8 Studio](https://room8studio.com/) |
|||
|
|||
* Visual FX |
|||
|
|||
Please familarise yourself with the [License](https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/blob/master/LICENSE.md) type for these assets. |
|||
You are free to use these assets in your own work. |
|||
|
|||
Everyone at Unity including our third-party contributors is very excited to see what you do with them in your Unity projects! |
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> |
|||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=assets_005Cbossroom_005Cscripts_005Cclient_005Cui_005Clobby/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> |
|
|||
[core] |
|||
repositoryformatversion = 0 |
|||
filemode = false |
|||
bare = false |
|||
logallrefupdates = true |
|||
symlinks = false |
|||
ignorecase = true |
|||
[remote "origin"] |
|||
url = https://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop.git |
|||
fetch = +refs/heads/*:refs/remotes/origin/* |
|||
[branch "main"] |
|||
remote = origin |
|||
merge = refs/heads/main |
|||
[branch "sam/feat/dedicated-server-support-review/2-new-DGS-flow"] |
|||
remote = origin |
|||
merge = refs/heads/sam/feat/dedicated-server-support-review/2-new-DGS-flow |
|
|||
Unnamed repository; edit this file 'description' to name the repository. |
|
|||
ref: refs/heads/sam/feat/dedicated-server-support-review/2-new-DGS-flow |
|
|||
#!/bin/sh |
|||
# |
|||
# An example hook script to check the commit log message taken by |
|||
# applypatch from an e-mail message. |
|||
# |
|||
# The hook should exit with non-zero status after issuing an |
|||
# appropriate message if it wants to stop the commit. The hook is |
|||
# allowed to edit the commit message file. |
|||
# |
|||
# To enable this hook, rename this file to "applypatch-msg". |
|||
|
|||
. git-sh-setup |
|||
commitmsg="$(git rev-parse --git-path hooks/commit-msg)" |
|||
test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} |
|||
: |
|
|||
#!/bin/sh |
|||
# |
|||
# An example hook script to check the commit log message. |
|||
# Called by "git commit" with one argument, the name of the file |
|||
# that has the commit message. The hook should exit with non-zero |
|||
# status after issuing an appropriate message if it wants to stop the |
|||
# commit. The hook is allowed to edit the commit message file. |
|||
# |
|||
# To enable this hook, rename this file to "commit-msg". |
|||
|
|||
# Uncomment the below to add a Signed-off-by line to the message. |
|||
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg |
|||
# hook is more suited to it. |
|||
# |
|||
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') |
|||
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" |
|||
|
|||
# This example catches duplicate Signed-off-by lines. |
|||
|
|||
test "" = "$(grep '^Signed-off-by: ' "$1" | |
|||
sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { |
|||
echo >&2 Duplicate Signed-off-by lines. |
|||
exit 1 |
|||
} |
|
|||
#!/usr/bin/perl |
|||
|
|||
use strict; |
|||
use warnings; |
|||
use IPC::Open2; |
|||
|
|||
# An example hook script to integrate Watchman |
|||
# (https://facebook.github.io/watchman/) with git to speed up detecting |
|||
# new and modified files. |
|||
# |
|||
# The hook is passed a version (currently 2) and last update token |
|||
# formatted as a string and outputs to stdout a new update token and |
|||
# all files that have been modified since the update token. Paths must |
|||
# be relative to the root of the working tree and separated by a single NUL. |
|||
# |
|||
# To enable this hook, rename this file to "query-watchman" and set |
|||
# 'git config core.fsmonitor .git/hooks/query-watchman' |
|||
# |
|||
my ($version, $last_update_token) = @ARGV; |
|||
|
|||
# Uncomment for debugging |
|||
# print STDERR "$0 $version $last_update_token\n"; |
|||
|
|||
# Check the hook interface version |
|||
if ($version ne 2) { |
|||
die "Unsupported query-fsmonitor hook version '$version'.\n" . |
|||
"Falling back to scanning...\n"; |
|||
} |
|||
|
|||
my $git_work_tree = get_working_dir(); |
|||
|
|||
my $retry = 1; |
|||
|
|||
my $json_pkg; |
|||
eval { |
|||
require JSON::XS; |
|||
$json_pkg = "JSON::XS"; |
|||
1; |
|||
} or do { |
|||
require JSON::PP; |
|||
$json_pkg = "JSON::PP"; |
|||
}; |
|||
|
|||
launch_watchman(); |
|||
|
|||
sub launch_watchman { |
|||
my $o = watchman_query(); |
|||
if (is_work_tree_watched($o)) { |
|||
output_result($o->{clock}, @{$o->{files}}); |
|||
} |
|||
} |
|||
|
|||
sub output_result { |
|||
my ($clockid, @files) = @_; |
|||
|
|||
# Uncomment for debugging watchman output |
|||
# open (my $fh, ">", ".git/watchman-output.out"); |
|||
# binmode $fh, ":utf8"; |
|||
# print $fh "$clockid\n@files\n"; |
|||
# close $fh; |
|||
|
|||
binmode STDOUT, ":utf8"; |
|||
print $clockid; |
|||
print "\0"; |
|||
local $, = "\0"; |
|||
print @files; |
|||
} |
|||
|
|||
sub watchman_clock { |
|||
my $response = qx/watchman clock "$git_work_tree"/; |
|||
die "Failed to get clock id on '$git_work_tree'.\n" . |
|||
"Falling back to scanning...\n" if $? != 0; |
|||
|
|||
return $json_pkg->new->utf8->decode($response); |
|||
} |
|||
|
|||
sub watchman_query { |
|||
my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') |
|||
or die "open2() failed: $!\n" . |
|||
"Falling back to scanning...\n"; |
|||
|
|||
# In the query expression below we're asking for names of files that |
|||
# changed since $last_update_token but not from the .git folder. |
|||
# |
|||
# To accomplish this, we're using the "since" generator to use the |
|||
# recency index to select candidate nodes and "fields" to limit the |
|||
# output to file names only. Then we're using the "expression" term to |
|||
# further constrain the results. |
|||
if (substr($last_update_token, 0, 1) eq "c") { |
|||
$last_update_token = "\"$last_update_token\""; |
|||
} |
|||
my $query = <<" END"; |
|||
["query", "$git_work_tree", { |
|||
"since": $last_update_token, |
|||
"fields": ["name"], |
|||
"expression": ["not", ["dirname", ".git"]] |
|||
}] |
|||
END |
|||
|
|||
# Uncomment for debugging the watchman query |
|||
# open (my $fh, ">", ".git/watchman-query.json"); |
|||
# print $fh $query; |
|||
# close $fh; |
|||
|
|||
print CHLD_IN $query; |
|||
close CHLD_IN; |
|||
my $response = do {local $/; <CHLD_OUT>}; |
|||
|
|||
# Uncomment for debugging the watch response |
|||
# open ($fh, ">", ".git/watchman-response.json"); |
|||
# print $fh $response; |
|||
# close $fh; |
|||
|
|||
die "Watchman: command returned no output.\n" . |
|||
"Falling back to scanning...\n" if $response eq ""; |
|||
die "Watchman: command returned invalid output: $response\n" . |
|||
"Falling back to scanning...\n" unless $response =~ /^\{/; |
|||
|
|||
return $json_pkg->new->utf8->decode($response); |
|||
} |
|||
|
|||
sub is_work_tree_watched { |
|||
my ($output) = @_; |
|||
my $error = $output->{error}; |
|||
if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { |
|||
$retry--; |
|||
my $response = qx/watchman watch "$git_work_tree"/; |
|||
die "Failed to make watchman watch '$git_work_tree'.\n" . |
|||
"Falling back to scanning...\n" if $? != 0; |
|||
$output = $json_pkg->new->utf8->decode($response); |
|||
$error = $output->{error}; |
|||
die "Watchman: $error.\n" . |
|||
"Falling back to scanning...\n" if $error; |
|||
|
|||
# Uncomment for debugging watchman output |
|||
# open (my $fh, ">", ".git/watchman-output.out"); |
|||
# close $fh; |
|||
|
|||
# Watchman will always return all files on the first query so |
|||
# return the fast "everything is dirty" flag to git and do the |
|||
# Watchman query just to get it over with now so we won't pay |
|||
# the cost in git to look up each individual file. |
|||
my $o = watchman_clock(); |
|||
$error = $output->{error}; |
|||
|
|||
die "Watchman: $error.\n" . |
|||
"Falling back to scanning...\n" if $error; |
|||
|
|||
output_result($o->{clock}, ("/")); |
|||
$last_update_token = $o->{clock}; |
|||
|
|||
eval { launch_watchman() }; |
|||
return 0; |
|||
} |
|||
|
|||
die "Watchman: $error.\n" . |
|||
"Falling back to scanning...\n" if $error; |
|||
|
|||
return 1; |
|||
} |
|||
|
|||
sub get_working_dir { |
|||
my $working_dir; |
|||
if ($^O =~ 'msys' || $^O =~ 'cygwin') { |
|||
$working_dir = Win32::GetCwd(); |
|||
$working_dir =~ tr/\\/\//; |
|||
} else { |
|||
require Cwd; |
|||
$working_dir = Cwd::cwd(); |
|||
} |
|||
|
|||
return $working_dir; |
|||
} |
|
|||
#!/bin/sh |
|||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n"; exit 2; } |
|||
git lfs post-checkout "$@" |
|
|||
#!/bin/sh |
|||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.\n"; exit 2; } |
|||
git lfs post-commit "$@" |
|
|||
#!/bin/sh |
|||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; } |
|||
git lfs post-merge "$@" |
|
|||
#!/bin/sh |
|||
# |
|||
# An example hook script to prepare a packed repository for use over |
|||
# dumb transports. |
|||
# |
|||
# To enable this hook, rename this file to "post-update". |
|||
|
|||
exec git update-server-info |
|
|||
#!/bin/sh |
|||
# |
|||
# An example hook script to verify what is about to be committed |
|||
# by applypatch from an e-mail message. |
|||
# |
|||
# The hook should exit with non-zero status after issuing an |
|||
# appropriate message if it wants to stop the commit. |
|||
# |
|||
# To enable this hook, rename this file to "pre-applypatch". |
|||
|
|||
. git-sh-setup |
|||
precommit="$(git rev-parse --git-path hooks/pre-commit)" |
|||
test -x "$precommit" && exec "$precommit" ${1+"$@"} |
|||
: |
|
|||
#!/bin/sh |
|||
# |
|||
# An example hook script to verify what is about to be committed. |
|||
# Called by "git commit" with no arguments. The hook should |
|||
# exit with non-zero status after issuing an appropriate message if |
|||
# it wants to stop the commit. |
|||
# |
|||
# To enable this hook, rename this file to "pre-commit". |
|||
|
|||
if git rev-parse --verify HEAD >/dev/null 2>&1 |
|||
then |
|||
against=HEAD |
|||
else |
|||
# Initial commit: diff against an empty tree object |
|||
against=$(git hash-object -t tree /dev/null) |
|||
fi |
|||
|
|||
# If you want to allow non-ASCII filenames set this variable to true. |
|||
allownonascii=$(git config --type=bool hooks.allownonascii) |
|||
|
|||
# Redirect output to stderr. |
|||
exec 1>&2 |
|||
|
|||
# Cross platform projects tend to avoid non-ASCII filenames; prevent |
|||
# them from being added to the repository. We exploit the fact that the |
|||
# printable range starts at the space character and ends with tilde. |
|||
if [ "$allownonascii" != "true" ] && |
|||
# Note that the use of brackets around a tr range is ok here, (it's |
|||
# even required, for portability to Solaris 10's /usr/bin/tr), since |
|||
# the square bracket bytes happen to fall in the designated range. |
|||
test $(git diff --cached --name-only --diff-filter=A -z $against | |
|||
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 |
|||
then |
|||
cat <<\EOF |
|||
Error: Attempt to add a non-ASCII file name. |
|||
|
|||
This can cause problems if you want to work with people on other platforms. |
|||
|
|||
To be portable it is advisable to rename the file. |
|||
|
|||
If you know what you are doing you can disable this check using: |
|||
|
|||
git config hooks.allownonascii true |
|||
EOF |
|||
exit 1 |
|||
fi |
|||
|
|||
# If there are whitespace errors, print the offending file names and fail. |
|||
exec git diff-index --check --cached $against -- |
|
|||
#!/bin/sh |
|||
# |
|||
# An example hook script to verify what is about to be committed. |
|||
# Called by "git merge" with no arguments. The hook should |
|||
# exit with non-zero status after issuing an appropriate message to |
|||
# stderr if it wants to stop the merge commit. |
|||
# |
|||
# To enable this hook, rename this file to "pre-merge-commit". |
|||
|
|||
. git-sh-setup |
|||
test -x "$GIT_DIR/hooks/pre-commit" && |
|||
exec "$GIT_DIR/hooks/pre-commit" |
|||
: |
|
|||
#!/bin/sh |
|||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.\n"; exit 2; } |
|||
git lfs pre-push "$@" |
|
|||
#!/bin/sh |
|||
|
|||
# An example hook script to verify what is about to be pushed. Called by "git |
|||
# push" after it has checked the remote status, but before anything has been |
|||
# pushed. If this script exits with a non-zero status nothing will be pushed. |
|||
# |
|||
# This hook is called with the following parameters: |
|||
# |
|||
# $1 -- Name of the remote to which the push is being done |
|||
# $2 -- URL to which the push is being done |
|||
# |
|||
# If pushing without using a named remote those arguments will be equal. |
|||
# |
|||
# Information about the commits which are being pushed is supplied as lines to |
|||
# the standard input in the form: |
|||
# |
|||
# <local ref> <local oid> <remote ref> <remote oid> |
|||
# |
|||
# This sample shows how to prevent push of commits where the log message starts |
|||
# with "WIP" (work in progress). |
|||
|
|||
remote="$1" |
|||
url="$2" |
|||
|
|||
zero=$(git hash-object --stdin </dev/null | tr '[0-9a-f]' '0') |
|||
|
|||
while read local_ref local_oid remote_ref remote_oid |
|||
do |
|||
if test "$local_oid" = "$zero" |
|||
then |
|||
# Handle delete |
|||
: |
|||
else |
|||
if test "$remote_oid" = "$zero" |
|||
then |
|||
# New branch, examine all commits |
|||
range="$local_oid" |
|||
else |
|||
# Update to existing branch, examine new commits |
|||
range="$remote_oid..$local_oid" |
|||
fi |
|||
|
|||
# Check for WIP commit |
|||
commit=$(git rev-list -n 1 --grep '^WIP' "$range") |
|||
if test -n "$commit" |
|||
then |
|||
echo >&2 "Found WIP commit in $local_ref, not pushing" |
|||
exit 1 |
|||
fi |
|||
fi |
|||
done |
|||
|
|||
exit 0 |
|
|||
#!/bin/sh |
|||
# |
|||
# Copyright (c) 2006, 2008 Junio C Hamano |
|||
# |
|||
# The "pre-rebase" hook is run just before "git rebase" starts doing |
|||
# its job, and can prevent the command from running by exiting with |
|||
# non-zero status. |
|||
# |
|||
# The hook is called with the following parameters: |
|||
# |
|||
# $1 -- the upstream the series was forked from. |
|||
# $2 -- the branch being rebased (or empty when rebasing the current branch). |
|||
# |
|||
# This sample shows how to prevent topic branches that are already |
|||
# merged to 'next' branch from getting rebased, because allowing it |
|||
# would result in rebasing already published history. |
|||
|
|||
publish=next |
|||
basebranch="$1" |
|||
if test "$#" = 2 |
|||
then |
|||
topic="refs/heads/$2" |
|||
else |
|||
topic=`git symbolic-ref HEAD` || |
|||
exit 0 ;# we do not interrupt rebasing detached HEAD |
|||
fi |
|||
|
|||
case "$topic" in |
|||
refs/heads/??/*) |
|||
;; |
|||
*) |
|||
exit 0 ;# we do not interrupt others. |
|||
;; |
|||
esac |
|||
|
|||
# Now we are dealing with a topic branch being rebased |
|||
# on top of master. Is it OK to rebase it? |
|||
|
|||
# Does the topic really exist? |
|||
git show-ref -q "$topic" || { |
|||
echo >&2 "No such branch $topic" |
|||
exit 1 |
|||
} |
|||
|
|||
# Is topic fully merged to master? |
|||
not_in_master=`git rev-list --pretty=oneline ^master "$topic"` |
|||
if test -z "$not_in_master" |
|||
then |
|||
echo >&2 "$topic is fully merged to master; better remove it." |
|||
exit 1 ;# we could allow it, but there is no point. |
|||
fi |
|||
|
|||
# Is topic ever merged to next? If so you should not be rebasing it. |
|||
only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` |
|||
only_next_2=`git rev-list ^master ${publish} | sort` |
|||
if test "$only_next_1" = "$only_next_2" |
|||
then |
|||
not_in_topic=`git rev-list "^$topic" master` |
|||
if test -z "$not_in_topic" |
|||
then |
|||
echo >&2 "$topic is already up to date with master" |
|||
exit 1 ;# we could allow it, but there is no point. |
|||
else |
|||
exit 0 |
|||
fi |
|||
else |
|||
not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` |
|||
/usr/bin/perl -e ' |
|||
my $topic = $ARGV[0]; |
|||
my $msg = "* $topic has commits already merged to public branch:\n"; |
|||
my (%not_in_next) = map { |
|||
/^([0-9a-f]+) /; |
|||
($1 => 1); |
|||
} split(/\n/, $ARGV[1]); |
|||
for my $elem (map { |
|||
/^([0-9a-f]+) (.*)$/; |
|||
[$1 => $2]; |
|||
} split(/\n/, $ARGV[2])) { |
|||
if (!exists $not_in_next{$elem->[0]}) { |
|||
if ($msg) { |
|||
print STDERR $msg; |
|||
undef $msg; |
|||
} |
|||
print STDERR " $elem->[1]\n"; |
|||
} |
|||
} |
|||
' "$topic" "$not_in_next" "$not_in_master" |
|||
exit 1 |
|||
fi |
|||
|
|||
<<\DOC_END |
|||
|
|||
This sample hook safeguards topic branches that have been |
|||
published from being rewound. |
|||
|
|||
The workflow assumed here is: |
|||
|
|||
* Once a topic branch forks from "master", "master" is never |
|||
merged into it again (either directly or indirectly). |
|||
|
|||
* Once a topic branch is fully cooked and merged into "master", |
|||
it is deleted. If you need to build on top of it to correct |
|||
earlier mistakes, a new topic branch is created by forking at |
|||
the tip of the "master". This is not strictly necessary, but |
|||
it makes it easier to keep your history simple. |
|||
|
|||
* Whenever you need to test or publish your changes to topic |
|||
branches, merge them into "next" branch. |
|||
|
|||
The script, being an example, hardcodes the publish branch name |
|||
to be "next", but it is trivial to make it configurable via |
|||
$GIT_DIR/config mechanism. |
|||
|
|||
With this workflow, you would want to know: |
|||
|
|||
(1) ... if a topic branch has ever been merged to "next". Young |
|||
topic branches can have stupid mistakes you would rather |
|||
clean up before publishing, and things that have not been |
|||
merged into other branches can be easily rebased without |
|||
affecting other people. But once it is published, you would |
|||
not want to rewind it. |
|||
|
|||
(2) ... if a topic branch has been fully merged to "master". |
|||
Then you can delete it. More importantly, you should not |
|||
build on top of it -- other people may already want to |
|||
change things related to the topic as patches against your |
|||
"master", so if you need further changes, it is better to |
|||
fork the topic (perhaps with the same name) afresh from the |
|||
tip of "master". |
|||
|
|||
Let's look at this example: |
|||
|
|||
o---o---o---o---o---o---o---o---o---o "next" |
|||
/ / / / |
|||
/ a---a---b A / / |
|||
/ / / / |
|||
/ / c---c---c---c B / |
|||
/ / / \ / |
|||
/ / / b---b C \ / |
|||
/ / / / \ / |
|||
---o---o---o---o---o---o---o---o---o---o---o "master" |
|||
|
|||
|
|||
A, B and C are topic branches. |
|||
|
|||
* A has one fix since it was merged up to "next". |
|||
|
|||
* B has finished. It has been fully merged up to "master" and "next", |
|||
and is ready to be deleted. |
|||
|
|||
* C has not merged to "next" at all. |
|||
|
|||
We would want to allow C to be rebased, refuse A, and encourage |
|||
B to be deleted. |
|||
|
|||
To compute (1): |
|||
|
|||
git rev-list ^master ^topic next |
|||
git rev-list ^master next |
|||
|
|||
if these match, topic has not merged in next at all. |
|||
|
|||
To compute (2): |
|||
|
|||
git rev-list master..topic |
|||
|
|||
if this is empty, it is fully merged to "master". |
|||
|
|||
DOC_END |
|
|||
#!/bin/sh |
|||
# |
|||
# An example hook script to make use of push options. |
|||
# The example simply echoes all push options that start with 'echoback=' |
|||
# and rejects all pushes when the "reject" push option is used. |
|||
# |
|||
# To enable this hook, rename this file to "pre-receive". |
|||
|
|||
if test -n "$GIT_PUSH_OPTION_COUNT" |
|||
then |
|||
i=0 |
|||
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" |
|||
do |
|||
eval "value=\$GIT_PUSH_OPTION_$i" |
|||
case "$value" in |
|||
echoback=*) |
|||
echo "echo from the pre-receive-hook: ${value#*=}" >&2 |
|||
;; |
|||
reject) |
|||
exit 1 |
|||
esac |
|||
i=$((i + 1)) |
|||
done |
|||
fi |
|
|||
#!/bin/sh |
|||
# |
|||
# An example hook script to prepare the commit log message. |
|||
# Called by "git commit" with the name of the file that has the |
|||
# commit message, followed by the description of the commit |
|||
# message's source. The hook's purpose is to edit the commit |
|||
# message file. If the hook fails with a non-zero status, |
|||
# the commit is aborted. |
|||
# |
|||
# To enable this hook, rename this file to "prepare-commit-msg". |
|||
|
|||
# This hook includes three examples. The first one removes the |
|||
# "# Please enter the commit message..." help message. |
|||
# |
|||
# The second includes the output of "git diff --name-status -r" |
|||
# into the message, just before the "git status" output. It is |
|||
# commented because it doesn't cope with --amend or with squashed |
|||
# commits. |
|||
# |
|||
# The third example adds a Signed-off-by line to the message, that can |
|||
# still be edited. This is rarely a good idea. |
|||
|
|||
COMMIT_MSG_FILE=$1 |
|||
COMMIT_SOURCE=$2 |
|||
SHA1=$3 |
|||
|
|||
/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" |
|||
|
|||
# case "$COMMIT_SOURCE,$SHA1" in |
|||
# ,|template,) |
|||
# /usr/bin/perl -i.bak -pe ' |
|||
# print "\n" . `git diff --cached --name-status -r` |
|||
# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; |
|||
# *) ;; |
|||
# esac |
|||
|
|||
# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') |
|||
# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" |
|||
# if test -z "$COMMIT_SOURCE" |
|||
# then |
|||
# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" |
|||
# fi |
|
|||
#!/bin/sh |
|||
|
|||
# An example hook script to update a checked-out tree on a git push. |
|||
# |
|||
# This hook is invoked by git-receive-pack(1) when it reacts to git |
|||
# push and updates reference(s) in its repository, and when the push |
|||
# tries to update the branch that is currently checked out and the |
|||
# receive.denyCurrentBranch configuration variable is set to |
|||
# updateInstead. |
|||
# |
|||
# By default, such a push is refused if the working tree and the index |
|||
# of the remote repository has any difference from the currently |
|||
# checked out commit; when both the working tree and the index match |
|||
# the current commit, they are updated to match the newly pushed tip |
|||
# of the branch. This hook is to be used to override the default |
|||
# behaviour; however the code below reimplements the default behaviour |
|||
# as a starting point for convenient modification. |
|||
# |
|||
# The hook receives the commit with which the tip of the current |
|||
# branch is going to be updated: |
|||
commit=$1 |
|||
|
|||
# It can exit with a non-zero status to refuse the push (when it does |
|||
# so, it must not modify the index or the working tree). |
|||
die () { |
|||
echo >&2 "$*" |
|||
exit 1 |
|||
} |
|||
|
|||
# Or it can make any necessary changes to the working tree and to the |
|||
# index to bring them to the desired state when the tip of the current |
|||
# branch is updated to the new commit, and exit with a zero status. |
|||
# |
|||
# For example, the hook can simply run git read-tree -u -m HEAD "$1" |
|||
# in order to emulate git fetch that is run in the reverse direction |
|||
# with git push, as the two-tree form of git read-tree -u -m is |
|||
# essentially the same as git switch or git checkout that switches |
|||
# branches while keeping the local changes in the working tree that do |
|||
# not interfere with the difference between the branches. |
|||
|
|||
# The below is a more-or-less exact translation to shell of the C code |
|||
# for the default behaviour for git's push-to-checkout hook defined in |
|||
# the push_to_deploy() function in builtin/receive-pack.c. |
|||
# |
|||
# Note that the hook will be executed from the repository directory, |
|||
# not from the working tree, so if you wan |