Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more details on object pooling in Networking-Tips-&-Tricks.md #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Tools/Docusaurus/docs/Networking-Tips-&-Tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ When used in combination with networked events, events are usually processed and
Synced variables are updated periodically by the owner. Due to the restrictions on the amount of data that can be synced, synced variables are especially costly. However they are also limited per-variable. This is especially noticeable with strings as the max character length is around 50-ish.

# Instantiation
Instantiation is currently (2020-06-17) not networked. Instantiated objects cannot be correctly synchronized.
The only workaround is to use object-pooling. (Note: Please write a more detailed guide on that)
Instantiation is still (2023-09-25) not networked. Instantiated objects cannot be correctly synchronized.
The only workaround is to use object-pooling. Which can be done by making an array and filling it with an approximate number of gameobjects needed and cycling through them with networking methods by using a synced incrementing Int as the index. Which can be reset to 0 when the index reaches the array's length to start the cycle again from the "oldest" object if needed.