com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

Doesnt work Custom Scene Management in new versions?

Open mydavlet opened this issue 2 years ago • 2 comments

Hello.

What i do in older versions without network Prefabs List

In-Scene Placed NetworkObject Registration Steps:

  • Create an instance of a Network Prefab in your scene.
  • Select the instance and in the inspector view navigate to the NetworkObject component
  • Copy the GlobalObjectIdHash value of the NetworkObjectimage
  • Within your NetworkManager, create a new Network Prefab entry in the Network Prefabs list.
  • Check the "Override" property of the new Network Prefab entry.
  • Select "Hash" and paste the GlobalObjectIdHash value into the "Hash" field.
  • Drag an drop your recently created in-scene placed Network Prefab to link the two together (GlobalObjectIdHash and Network Prefab)

It doesnt work in new versions because i cant drag object from scene to prefab list. I can drag prefab but it's doesnt work. Sorry for my bag english friends!

i use this help but it work for versions without prefab list https://docs-multiplayer.unity3d.com/netcode/current/basics/scenemanagement/custom-management/#docusaurus_skipToContent_fallback

mydavlet avatar Aug 21 '23 11:08 mydavlet

@mydavlet You need to either create a unique network prefab list or add your newly created network prefab to the DefaultNetworkPrefab list typically located at the root of the Assets folder.

image

If you don't see the DefaultNetworkPrefab asset, make sure your Project Settings->Netcode for GameObjects->Generate Default Network Prefabs List is checked: image

If you prefer to make your own network prefab list you can right click in any folder and select Create->Netcode->Network Prefab List. image

Once you have your Network Prefab List asset (default or your own), then editing it is exactly the same as it was when it was all contained within the NetworkManager. Also make sure the prefab list containing the override is added to the NetworkManager-> Network Prefabs Lists.

That should get you running again with prefab overrides.
👍

NoelStephensUnity avatar Aug 30 '23 23:08 NoelStephensUnity

We cant add to prefab list objects from scene. We can add only prefabs. Anyway i go to Mirror Solution after that update. My projects didnt works after Update...(

mydavlet avatar Sep 01 '23 07:09 mydavlet