Skip to content

Conversation

@ShadauxCat
Copy link
Collaborator

No description provided.

NoelStephensUnity and others added 11 commits October 2, 2023 14:41
…ed prefab instances [MTT-7055] (#2707)

* update

Resolves MTT-7055.
Split apart the NetworkObjectRefreshTool from NetworkObject.
Made some updates that don't require any form of editor application update.
Added script in NetworkObject.RefreshAllPrefabInstances context menu method that handles refreshing the currently active scene and all enabled scenes in the build list.
Added dialog notification when attempting to do a NetworkObject Refresh on an in-scene placed prefab instance as opposed to a prefab instance.

* test

Made some minor updates for the manual test

* update

adding change log entry

* style

Added object type identifier constants for code clarity purposes.
…GenerateSerializationForTypeAttribute` (#2694)

This enables users to control the generation of serialization code through codegen, making it easier to create their own network variable subtypes, and also making it possible for them to easily generate serialization for specific types they know they need to use. NetworkVariable and NetworkList have been changed to use these attributes so they are no longer special cases in our codegen.

This PR also exposes methods in `NetworkVariableSerialization<T>` to further support this type of serialization need.

resolves #2686

---------

Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>
…hronization issues [MTT-7271] (#2712)

* update

Adding OnOwnershipChanged(ulong previous, ulong current)

* fix

This resolves the issue with client authoritative network transforms and the random "noise" that would occur when transitioning ownership from a remote client back to the host-server.
- Latent messages from the client would still be received and processed after ownership changed.
- Ownership changed messages would proceed the NetworkTransform initialization state update message. Now ownership changed messages precede the NetworkTransform initialization state update message.
- Clients could sometimes have the same network tick value even when the tick event had triggered, which for NetworkDeltaPosition would cause dropped state updates.
* update

Removing the invocation of process scene from the OnValidate.

* update

Just merging GenerateGlobalObjectIdHash into OnValidate (no reason to have the method call a method).
…h domain reload/scene reload being disabled (#2720)

Adds support for generic network behaviours, as well as for serializing generic types in RPCs (so long as the type is defined on the behaviour and not on the RPC itself; which is to say, this is supported:

```csharp
public class Foo<T> : NetworkBehaviour
{
    [ServerRpc]
    public void MyServerRpc(T val) {}
}
```

But this is not:

```csharp
public class Foo : NetworkBehaviour
{
    [ServerRpc]
    public void MyServerRpc<T>(T val) {}
}
```

As in the former case, when the class is instantiated, it knows what T is and there is only one version of the RPC per class, while the latter case would require much more significant plumbing for runtime type identification of RPC parameters in order to be able to instantiate the RPC correctly on the receiving side.)

In fixing this, the majority of the issues with domain reload were also fixed coincidentally, so I went ahead and fixed the couple of remaining issues as well.
Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>
Also fixes NetworkVariables with NonSerializedAttribute showing in editor when they should not.
…scenes loaded [MTT-7537] (#2723)

* fix

This fixes the issue where the currently active scene, on the server side, is not taken into consideration as being a valid "loaded scene" which can cause issues as outlined in GitHub issue #2722.

* fix: TestHelpers

This resolves an issue with integration testing where:
- the scene handler registration was being registered multiple times
- the server registration was not passing in true to NetcodeIntegrationTestHelper.RegisterHandlers
- the IntegrationTestSceneHandler.CoroutineRunner could get destroyed if the active scene it was instantiated within was unloaded (now it is migrated to the DDOL)
- Registration of the currently active scene during the scene handler registration was adjusted to no longer use NetworkSceneManager.GetAndAddNewlyLoadedSceneByName (but still registers the scene).

* test

Added an integration test: `NetworkSceneManagerFixValidationTests.InitialActiveSceneUnload`
This validates the fix for #2722.

* update

Adding change log entry for this fix.
@ShadauxCat ShadauxCat requested review from a team, TylerUnity and chrispope as code owners October 5, 2023 18:30
@ShadauxCat ShadauxCat closed this Oct 5, 2023
@ShadauxCat ShadauxCat deleted the chore/branched_off_release_1.7.0 branch October 5, 2023 18:34
@ShadauxCat ShadauxCat restored the chore/branched_off_release_1.7.0 branch October 5, 2023 18:40
@ShadauxCat ShadauxCat changed the title Chore/branched off release 1.7.0 chore: merge develop into release 1.7.0 Oct 5, 2023
@ShadauxCat ShadauxCat reopened this Oct 5, 2023
Copy link
Member

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:godmode:

@ShadauxCat ShadauxCat enabled auto-merge (squash) October 5, 2023 20:10
@ShadauxCat ShadauxCat merged commit cca13d8 into release/1.7.0 Oct 5, 2023
@ShadauxCat ShadauxCat deleted the chore/branched_off_release_1.7.0 branch October 5, 2023 20:17
ShadauxCat added a commit that referenced this pull request Oct 26, 2023
* chore: merge develop into release 1.7.0 (#2729)

* fix: Wrong MTU calculations in UnityTransport (#2731)

* chore: Tagging release 1.7.0 (#2736)

---------

Co-authored-by: Simon Lemay <simon.lemay@unity3d.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants