Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions 1 com.unity.netcode.gameobjects/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Additional documentation and release notes are available at [Multiplayer Documen

### Fixed

- Initialization errors with NetworkAnimator. (#3767)
- Multiple disconnect events from the same transport will no longer disconnect the host. (#3707)
- Fixed NetworkTransform state synchronization issue when `NetworkTransform.SwitchTransformSpaceWhenParented` is enabled and the associated NetworkObject is parented multiple times in a single frame or within a couple of frames. (#3664)
- Fixed issue when spawning, parenting, and immediately re-parenting when `NetworkTransform.SwitchTransformSpaceWhenParented` is enabled. (#3664)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,13 +720,16 @@ internal AnimationMessage GetAnimationMessage()
return m_AnimationMessage;
}

/// <inheritdoc/>
public override void OnNetworkSpawn()
internal override void InternalOnNetworkPreSpawn(ref NetworkManager networkManager)
{
// Save internal state references
m_LocalNetworkManager = NetworkManager;
m_LocalNetworkManager = networkManager;
DistributedAuthorityMode = m_LocalNetworkManager.DistributedAuthorityMode;
}

/// <inheritdoc/>
public override void OnNetworkSpawn()
{
// If there is no assigned Animator then generate a server network warning (logged locally and if applicable on the server-host side as well).
if (m_Animator == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,8 @@ public virtual void OnNetworkDespawn() { }
/// </summary>
public virtual void OnNetworkPreDespawn() { }

internal virtual void InternalOnNetworkPreSpawn(ref NetworkManager networkManager) { }

internal void NetworkPreSpawn(ref NetworkManager networkManager, NetworkObject networkObject)
{
m_NetworkObject = networkObject;
Expand All @@ -761,6 +763,8 @@ internal void NetworkPreSpawn(ref NetworkManager networkManager, NetworkObject n

UpdateNetworkProperties();

InternalOnNetworkPreSpawn(ref networkManager);

// Exit early for disabled NetworkBehaviours.
// We still want the above values to be set.
if (!gameObject.activeInHierarchy)
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.