GithubHelp home page GithubHelp logo

unity-technologies / com.unity.multiplayer.docs Goto Github PK

View Code? Open in Web Editor NEW
606.0 606.0 183.0 180.49 MB

Open Source documentation for Unity Multiplayer, which includes Netcode for GameObjects, the Unity Transport Package, Multiplayer Tools and Educational references and Sample Games such as Boss Room.

Home Page: https://docs-multiplayer.unity3d.com/

License: Other

JavaScript 67.86% CSS 1.64% SCSS 29.17% TypeScript 1.33%

com.unity.multiplayer.docs's Introduction

Unity Multiplayer Networking Docs

Welcome to the Unity Multiplayer Networking Documentation. This site includes the Netcode for GameObjects, Unity Transport, Boss Room Sample Co-op, Bitesize samples, and other tools and features.

The documentation site is built using Docusaurus 2 using Yarn and Node.js.

Website Forums Discord

Contributing Content

Always cut branches from main branch.

See the Contribution Guide to learn about writing and submitting content, our GitHub labels, and more. A template file (/docs/template.md) is included in the repo to understand markdown formatting and options.

Installation

You can install and build docs on Mac and Windows environments. The doc site is built on Docusaurus, which requires NodeJS and Yarn installed for your OS.

  1. Install NodeJS.
  2. Install Yarn.
  3. Install Docusaurus to a temp location: yarn global add docusaurus-init. You can delete the temp project.
  4. Install all packages: yarn install

Building on Local

For full building content, see Building Locally:

  1. Run the build command to generate a site. This command generates static content into the build directory.

    yarn build
  2. Start a local development server and open up a browser window with the following command. Most changes are hot-loaded, displaying without requiring a rebuild and restart.

    yarn start

Connect with Unity

Connect with the Unity Multiplayer Solution Architect team and community on the Unity Multiplayer Networking and for documentation team using channel #documentation. You can also raise threads on the Unity Multiplayer Forum

Tools Used

Our site uses Docusaurus with Yarn commands. Always use Yarn commands, to update, build, and serve the server locally. Our search uses Algolia for Open Source.

com.unity.multiplayer.docs's People

Contributors

11belowstudio avatar alexandermartinffatg avatar amanda-butler-unity avatar armstrongl avatar binaerbaum avatar briancoughlin avatar cdmazom avatar chrispope avatar dependabot[bot] avatar fernando-cortez avatar jabbacakes avatar jilfranco-unity avatar johann-r-unity avatar kira0x1 avatar lkrell avatar lplafontaineb avatar lukestampfli avatar martinunity avatar mraue avatar noelstephensunity avatar s-omeilia-unity avatar samuelbellomo avatar shadauxcat avatar simon-lemay-unity avatar sushiwaumai avatar thecatontheflat avatar thusspokenomad avatar valere91unity avatar vic-cooper avatar will-mearns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

com.unity.multiplayer.docs's Issues

feedback about missing info in the docs

Provide Feedback on Docs in general
First of all thank you for the good job you guys are doing on the docs
There are concepts which are very well described in the doc and concepts which are not described. I haven't dogged deep into the source code yet so the answer to some of these might be obvious there but adding info in pages would be very helpful.

  • The network time in network manager is not described anywhere? Is it working? how well does it sync? how much delta is common between client and server, can it move backwards, does it slow the game down when the error delta is huge?
  • Sequencing properties of messages are not described? Are all unreliable messages unordered and all reliable ones ordered? can we change this? concepts like fragmented channels of uNet for sending bigger messages are not described? While sending messages which are big using a RUDP library is not a good practice, it is a good idea to describe the limitations and features on these?
  • Network config variables are not described? The best source for the uNet config was Alexey Abramychev's video at unite 16? please provide more complete info on that regard?
  • should we use the low level transport for calculating delay between server and client?
  • can we use secure communication in MLAPI or not if yes, how? can it be enabled on a per RPC basis?
  • How does the library send messages? is it immediate? is it at the end of each frame? Can this be changed? Is there any behavior like NetworkServer.sendDelay in uNet which never should have been there IMO? I want to know if there is anything like that to set it to 0.
  • Can we change the pool sizes for NetworkConnection, NetworkBuffer and related classes depending on our game's player count and message frequencies? If yes how?
  • Any limits/benchmarks can be helpful because a blog post mentioned a 65 player limit without mentioning the throughput or the reasoning of that number.
  • Can we listen to two transports for say webGL and UDP in a single server if yes how? in uNet we could do this using two SimpleServers which one of them was added as external conneciton to NetworkServer. Is anything like that possible here? Do we have NetworkClient and NetworkServer classes here? I don't want to use the NetworkManager to be able to run multiple clients say for load testing or multiple servers so can listen to all clients on all platforms. how can I do that? I found out the answer to most of these or almost all of them by reading the source code but adding them to the docs is greatly appreciated.
    Cheers

Specific page:
This is not anything specific to any page but a set of info missing from the pages

About the site:
A few new pages describing these unspecified parts of the documentation or modifying the current pages in a way that they describe these as well.

Highlighting color in dark mode

Is your feature request related to a problem? Please describe.
The highlighting with ` is obnoxious in dark mode:
image
Compared to this beautiful subtle background in light mode:
image

Describe the solution you would like:
Could we change the color scheme of the highlights to something which works better?

Documentation implies NamedMessages will send from Host to Local Client, but they do not.

Describe the bug
Not sure if a bug or intended, but the documentation heavily implies (both by proximity of Named Message documentation to RPC documentation, where RPC's are called on the hosts local client) that named messages can be sent from the host to the local client. This is not the case.

To Reproduce
Steps to reproduce the behavior:

  1. Register a named message handler on the host.
  2. Send a custom named message from the host to the local client id.
  3. Message is not sent or received.

Expected behavior
Based on the documentation I would expect this message to be received by the client via an internal message.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: Windows 10
  • Unity Version: 2020.1.14f1
  • MLAPI Version: v12.1.7
  • MLAPI Commit: Latest.

Additional context
Without being able to send named messages locally, it will require two message pipelines from a host controller - one for remote clients, and one for the local client.

Feedback for /docs/components/networkanimator.md

Please specify in this page that usually games don't synchronize animation state and instead derive it from other synchronized state like position and other attributes/events.
I don't know of any commercial game which wastes bandwidth to serialize animations. I'm sure you can find examples but still it's good to state this in here.

Disclaimer I haven't checked BossRoom or its documentation, You might have said it there but I probably it is equally important or even more important to state it here just like you stated the fact that most games need to write their own transform sync code in the page for that component. This is probably ok for prototying animation synchronization but not for anything more IMHO We did not have a similar component for uLink even for prototyping and we only had 5 types of character synchronization scripts for different types of games based on rigidbodies, character controllers, transforms and ... we had multiple ones per component for games which have gravity and jumping and for those which don't and that was it.

Feedback for /docs/transport/workflow-client-server.md

Provide Feedback on Docs
Create minimal client and server tutorials use obsolete API and thus don't work.
var writer = m_Driver.BeginSend(NetworkPipeline.Null, m_Connections[i]); should probably be: m_Driver.BeginSend(m_Connections[i], out DataStreamWriter writer);. (need someone working on UTP to verify this as I have no idea what I'm doing) (Issue is present in both ClientBehaviour and ServerBehaviour in both the tutorial and the source files)

Also it would be nice to know what the int which BeginSend returns represents. The API docs say it's undocumented.

About the site:
What would you like to see on the website?

Feedback for /docs/learn/getting-started-boss-room.md

Hi folks, thanks for posting this!

I'm stuck trying to get the Boss Room project to open. It keeps complaining that I don't have git installed - I did before downloading, but did a fresh install just in case.

Is it looking for Git in a specific location? If so, can you let me know where it wants to be?

If this is meant for beginners, they might struggle ;)

Cheers & hope to hear from you soon,
Cam

I added the log btw
Editor.log

Github link is broken

Describe the bug:
The link:
https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi.git?path=/com.unity.multiplayer.mlapi#develop
is moving me to the 404 page. The unity editor can not download the files

Steps to reproduce the behavior:

  1. Go to this page: https://docs-multiplayer.unity3d.com/docs/tutorials/helloworldintro
  2. Click on this link: https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi.git?path=/com.unity.multiplayer.mlapi#develop
  3. See error: 404 page

Expected behavior:
The github page with the MLAPI

Desktop/Tablet/Smartphone (please complete the following information):

  • Windows
  • Browser chrome

Feedback for /docs/tutorials/goldenpath.md

Firstly, thanks so much for the documentation!

I had weird behavior when connecting multiple clients. After some head-scratching, I fixed by changing IsClient to IsClient && IsOwner in several places. I realize multiple clients is not mentioned here, but figured people may want to try it, and this could avoid some confusion.

Feedback for /docs/migration/migratingtomlapi.md

The first sentence under the "Current limitations" section reads:

Review the following limitations for upgrade and migrations from previous versions of MLAPI to Unity MLAPI

and I believe you intended it to be

Review the following limitations for upgrade and migrations from previous versions of UNet to Unity MLAPI

Feedback for x/docs/template.md

Provide Feedback on Docs
This should have a link which links to the markdown file of this page on Github for convenience. Else someone who just edits the docs using website features will have to manually find this template on Github or clone the repo.

Specific page:
docs/template.md

About the site:
What would you like to see on the website?

Feedback for /docs/tutorials/helloworldintro.md

I tried creating a new project, using the Package Manager, +, Github as instructed, however, I get the following error:

[Package Manager Window] Error adding package: https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi.git?path=/com.unity.multiplayer.mlapi#0.1.0.
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

I may be worthwhile to add this error and its resolution to this page, just in case anyone else hits it. I don't know what the resolution is or what this means.

Feedback for /docs/getting-started/index.md

Provide Feedback on Docs

Clicking the external site badge image links for release, nuget, downloads, forum and discord also enlarges the images and opens the page in a new tab. When you return to the docs site you see the badge image in focus.
Enlarge Image issue

Not need to enlarge these image badges upon clicking the link.

Feedback for /docs/mlapi-basics/object-spawning.md

Hello

In Scene Objects section it is said that

Any objects in the scene with NetworkObject components will get automatically replicated by MLAPI. There is no need to manually spawn them.

This is not entirely accurate, because only active NetworkObject that will get automatically replicated by MLAPI. Inactive NetworkObject will not be replicated, thus didn't have NetworkObjectId even after you enabled it in the middle of the game.

See this issue for more information https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/issues/730

Thank you

Spawn object based on PrefabHash

Is your feature request related to a problem? Please describe.
I have a prefab which I want to spawn on the server so I'm sending the hash from my client to the server. How do I find the right object on the server side to instantiate it?

https://discord.com/channels/449263083769036810/563033158480691211/815941701755600926

Describe the solution you would like:
Explain how to find prefabs by hash from the networkingmanager in an "Advanced" section in spawning

Additional info:
Tracking this for me or someone else to document it.

Feedback for /docs/components/networkmanager.md

Provide Feedback on Docs
Please add links to where it's written name of components and other terms like in unity's documentation for easier accessibility

Specific page:
If you clicked Log an issue through the site, the doc file is in the issue title. Or add a link to the page you want to give feedback on.

About the site:
What would you like to see on the website?

Feedback for /docs/tutorials/helloworldparttwo.md

Hello, I am configuring Hello World project according to this tutorial, but I am little bit confused by the result.
After finishing the tutorial:

  • Start play mode
  • Start as host in one instance, start as client in another instance
  • Connecting as client produces following warning in the console : "Only the owner can invoke a ServerRpc that requires ownership!"

However, as stated by docs:
If we are a client, we call a server RPC. This server RPC simply sets the position NetworkVariable on the server's instance of this player...

So, can a client call a server RPC or only the owner?

Feedback for /docs/tutorials/goldenpath.md

Sometimes on the Server the Player is not shown at the correct position (as it was static) but on the Client Side it works well => meaning that position is updated but it's not displayed. I solved this by reading the "NetworkTransform" script back to the Player and now the Player was also shown on the correct position also on the Server

Feedback for /docs/tutorials/helloworldintro.md

Provide Feedback on Docs
Enter feedback for any of the following. If you meant to enter a bug, select Issues then Bug Report.
Comment from Discord
Whyser — 03/20/2021
I really don't think people need to know, in a networking tutorial how to clear the Editor Console (https://mp-docs.dl.it.unity3d.com/docs/tutorials/helloworldintro) "NOTE
You may see the following error reported [...]". And most definitely not a video/gif showing it 😂. Just writing that it can be ignored should be enough ^^

Specific page:
If you clicked Log an issue through the site, the doc file is in the issue title. Or add a link to the page you want to give feedback on.

About the site:
What would you like to see on the website?

Feedback for x/docs/getting-started/library-initialization.md

Provide Feedback on Docs
Enter feedback for any of the following. If you meant to enter a bug, select Issues then Bug Report.

Specific page:
If you clicked Log an issue through the site, the doc file is in the issue title. Or add a link to the page you want to give feedback on.

About the site:
What would you like to see on the website?

Feedback for /docs/mlapi-basics/networkobject.md

Provide Feedback on Docs
There is a reference to component called NetworkTransfor on this page. I am assuming that is a misspelling and supposed to be NetworkTransfer? I also don't see any reference to a NetworkTransfer (or NetworkTransfor) in the api docs or the code repository for mlapi.

Specific page:
/docs/mlapi-basics/networkobject.md

About the site:
A clarification on the spelling of NetworkTransfor and some other references to what the component is.

Feedback for /docs/tutorials/goldenpath.md. Debug.Log() doesn't log output in console/terminal on Windows.

I'm going through the tutorials for Building Golden Path for the section Testing Server-controlled Network Variables on Windows 10, but I can't get any outputs when running ..../GoldenPath.exe -mlapi [server|client] in neither Powershell nor the Command Prompt.

From what I've been researching, Debug.Log() outputs are actually saved in a log file C:\Users\<user>\AppData\LocalLow\DefaultCompany\GoldenPath\Player.txt instead.

Would like some confirmation if displaying log output inside a shell is possible or not when running the build executable from command line.

Extra value is added to the value passed by spawnPayload

Describe the bug:
Passing spawnPayload to NetworkObject#Spaw(Steam) and reading stream from NetworkBehavior#NetworkStart(Stream), extra values are added.

Steps to reproduce the behavior:

  1. call Spawn method with spawnPayload.
var obj = Instantiate(SomePrefab);
var stream = new StringStream(new MemoryStream(Encoding.UTF8.GetBytes("helloworld")));
obj.GetComponent<NetworkedObject>().Spawn(stream.Stream);
  1. Read the value in NetworkStart
public override void NetworkStart(Stream stream)
{
    base.NetworkStart(stream);
    var memoryStream = new MemoryStream();
    stream.CopyTo(memoryStream);
    var message = Encoding.UTF8.GetString(memoryStream.ToArray());
    Debug.Log(message);
}
  1. The log will be output as hello with a mysterious message.
helloworld��Dt`XD�����䒈Dt�D�����DtDpblld�f�Z�hfpZhhhhZ��p�Zrf��lbbln�r�D��

Expected behavior:

I think only helloworld should be output.

Desktop/Tablet/Smartphone (please complete the following information):

  • OS: [e.g. iOS] windows10

Additional info:

Perhaps this problem is caused by something here in the code.
The buffer will be partially overwritten and extra information will be left behind.

if (payload != null) buffer.CopyFrom(payload);

https://github.com/Unity-Technologies/com.unity.multiplayer.mlapi/blob/023b64aeecaeee7461bdf989000ff9a796cfde1b/com.unity.multiplayer.mlapi/Runtime/Spawning/NetworkSpawnManager.cs#L511

Feedback for /docs/getting-started/index.md

Describe the bug:
MLAPI/UNET comparison table has some inaccuracies with the upcoming 0.1.0

  • Message Authentication should probably be removed. Not sure exactly what it refers to, but we don't have identity integrated at this time, and we've removed the MLAPI encryption code.
  • Built-in Lag Compensation should be removed. The implementation was never integrated, and has been removed to the "contrib" repo until we have time to do it properly.
  • Network Profiler should be removed. UNET DOES have a profiler, and in fact, we've only just reached parity with it in

Feedback for /docs/migration/migratingtomlapi.md

Provide Feedback on Docs
See note in: At this page, the naming on note looks kinda confusing -> ...must end with a Client/ServerRpc suffix. I think it can be changed to ClientRpc/ServerRpc to avoid confusion.

Per tentago in Discord.

Specific page:
The section at #replace-commandclientrpc

Main content section too small on small screen

I usually use a viewport width of 1280px when browsing the web. At this size, the main content section is too small, making the code block very inconvenience to read, compared to the old docfx theme. Also images overflow and is overlap with the table of content.

Here is an example:

image

Compared to the old package docs, which use the space a lot better, and I can read the code comfortably:

image

Feedback for /docs/transport/install.md

Provide Feedback on Docs
This installation guide is not working for me. If I enable preview packages in the package manager and search for transport or unity transport in the Unity registry nothing shows up. Using Unity 2020.2.0f1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.