Thank you for submitting your inquiry.
You can track the status of your inquiry here.
You may want to save your case's ticket: 1035798_eiul2bpgp267hnpu


    (Closed) UNET Network Documentation on and therefore execution order for ClientScene.RegisterPrefab is wrong
     
     
     
    4
    UNET Network Documentation on and therefore execution order for ClientScene.RegisterPrefab is wrong

    1. What happened
    I was trying to make use of the custom callbacks for spawning Prefabs using ClientScene.RegisterPrefab with delegates. This however turned out to be hard to get right with the HLAPI.
    I added a screenshot to clarify the issue. Since the project is quite large and hard to get running I can't isolate the problem right now but can describe it.

    - I'm using a basic NetworkManager with online offline scene configuration
    - In the online scene, there's a scene gameobject with a NetworkBehaviour component calling the desired RegisterPrefab call in OnStartClient (as provided in https://docs.unity3d.com/ScriptReference/Networking.ClientScene.RegisterPrefab.html)

    I'm running a standalone instance on the same computer as my client connecting from the Unity editor.

    On connecting the client, the following happens, as shown in the screenshot.
    The ClientScene ins readied (green) and the call from the server to instantiate the prefab is executed (red) before OnStartClient is even called to register the prefab (2. green).
    This is completely unexpected and leaves me thinking that the only place one can EVER use these callbacks is either before any networking occured (meaning NOT on any NetworkBehaviour, before a connection is established), or in Awake.

    Is that assumption right, or why is the documentation wrong about how to use it?


    License type: Pro
     
       
      To follow up on this case, send email to bugs@unity3d.com mentioning 'Case 1035798' in the subject.
      Your Cases:
      Case Title Status Date Opened
      1141772 SelectionBase attribute cannot be stacked Closed 3/29/2019 9:50 AM
      1141019 Unity OpenVR is automatically used Open 3/27/2019 12:50 PM
      1137312 InteractionManager keeps reference to previous or current active Controllers Open 3/15/2019 6:20 PM
      1136919 Crash when exiting play mode Closed 3/14/2019 2:40 PM
      1136869 DetachChildren causes DestroyImmediate to throw errors Open 3/14/2019 11:20 AM
      1134625 Unity crashes when switching from Android platform to UWP from within the Editor Closed 3/7/2019 11:10 AM
      1129911 Upgrading ASMDEF from 2018.3 to Unity 2019.2.0 results in error Open 2/21/2019 5:00 PM
      1127243 Whenever I run the hub I get this message. I do not have any cloud projects, which might be a case that has not been taken care Closed 2/14/2019 8:30 AM
      1125309 Having VS 2017 and VS 2019 on the same machine fails UWP build Closed 2/8/2019 12:10 PM
      1125304 TMPInputField starts out white when the first TMP related action is to create it Open 2/8/2019 12:00 PM
      1124990 Add Component Menu pull down width is too narrow for classes in namespaces Closed 2/7/2019 3:20 PM
      1124910 UNABLE TO LOAD DLL ADVAPI32.DLL when calling DateTime.Now Open 2/7/2019 10:50 AM
      1124177 Breakpoints in UWP builds do not break in generic methods Closed 2/5/2019 1:21 PM
      1124168 Build and Run on Hololens not working Open 2/5/2019 12:50 PM
      1121983 In Game mouse is broken Closed 1/29/2019 1:50 PM
      1121907 AndroidManifest only supports either build and run OR store release for Oculus Go Closed 1/29/2019 8:20 AM
      1120231 The console throws an error when opening Unity Preferences while scripts compile Closed 1/24/2019 8:20 AM
      1114526 Selecting a Signal Emitter in Timeline while the Inspector is locked causes NullReferenceExceptions Closed 1/4/2019 12:10 PM
      1111468 System.Array.ForEach not available on UWP Closed 12/20/2018 2:20 PM
      1103075 OnPointerDown has no pointer gameobject reference in Editor Closed 11/22/2018 11:00 AM
      1083162 Using ContentSizeFitter all the way up through HorizontalLayoutGroup and VerticalLayoutGroup is broken Closed 9/20/2018 10:50 PM
      1077938 Layout componets lock Rect Transform values indefinitely Closed 9/4/2018 10:00 PM
      1077928 ContentSizeFitter uses weird negative height values Closed 9/4/2018 9:30 PM
      1077925 Layout calculations do not happen on adding the first sibling Closed 9/4/2018 9:20 PM
      1077920 Horizontal or Vertical Layout Group Children are not expanding Closed 9/4/2018 8:50 PM
      1076758 [UWP] WWW SendWebRequest with HTTPS not working on Hololens with latest OS anymore Open 8/31/2018 5:10 PM
      1076755 [UWP] Missing Text Mesh Pro errors in VS project even though they're not used Closed 8/31/2018 5:00 PM
      1076284 IL2CPP UWP way slower than NET Closed 8/30/2018 12:00 PM
      1076264 Starting Unity Editor throws Unity extensions are not yet initialized error for each dll Closed 8/30/2018 11:00 AM
      1075200 EditorPrefs key version stuck on Unity Editor 5.x Closed 8/27/2018 3:00 PM
      1075094 !UNITY_EDITOR Scripting Define Symbole Closed 8/27/2018 10:10 AM
      1075092 Opening VS from a console log takes very long Closed 8/27/2018 10:00 AM
      1068876 Buildpipeline.BuildPlayer ignores local cache Server Closed 8/8/2018 5:10 PM
      1065436 Unity Editor Update Check new version shows as Closed 7/30/2018 7:20 AM
      1059569 Wait For Managed Debugger does not work with Oculus Go Open 7/12/2018 8:20 AM
      1056734 Font stays bold on Reset Value to Prefab Closed 7/5/2018 12:20 PM
      1054100 [UWP] System.IO.Compression.ZipArchive missing in IL2CPP Closed 6/29/2018 10:40 AM
      1054057 Project folder search and navigate is broken Closed 6/29/2018 7:40 AM
      1053466 MenuItem ValidateFunction is no longer validated Closed 6/27/2018 2:10 PM
      1053166 Scene indices reported by multi-scene setup warnings are off by 1 compared to scenes in build indices Closed 6/26/2018 3:20 PM
      1053159 Warning about difference in Realtime GI resolution when there's none Closed 6/26/2018 3:10 PM
      1046258 Assembly definition file needs to be available in Editor even though it's not used in UNITY_WSA only Closed 6/6/2018 1:10 PM
      1044570 NetworkIdentity ClientAuthorityOwner description is wrong Open 6/1/2018 10:50 AM
      1041104 BitBucket Networking Code not compiling with same Unity Version Closed 5/23/2018 9:00 AM
      1040910 Base class Command only called on first deriving parent on gameobject Closed 5/22/2018 6:20 PM
      1039377 NetworkBehaviour callback order is wrong Closed 5/18/2018 4:10 PM
      1039070 BuildPlayer with multiple platforms in conjunction with UNET changes throws UNETWeaver errors Closed 5/17/2018 5:40 PM
      1038904 [WSA] Denying microphone capability crashes the app Closed 5/17/2018 10:00 AM
      1035798 UNET Network Documentation on and therefore execution order for ClientScene.RegisterPrefab is wrong Closed 5/9/2018 4:00 PM
      1025685 UNETWeaver generates error in IL2CPP under UWP Closed 4/13/2018 11:10 AM
      1024033 UWP Application.version does not return version number Closed 4/9/2018 11:40 AM
      1022365 Collider mesh bounds not in local space Closed 4/5/2018 9:00 AM
      1022359 XR Settings ARCore Supported is not accessible from editor scripts Closed 4/5/2018 8:00 AM
      1022089 NetworkManager reloads offline scene only once when timed out Closed 4/4/2018 5:20 PM
      1021962 Selecting gameobjects in the scene or un-/folding inspector scripts lags Closed 4/4/2018 11:30 AM
      1019992 UI Prefab breaks UI layout Closed 3/29/2018 7:30 PM
      1010976 [MRDev] MR Portal Simulator yells into speakers when run from Editor Open 3/8/2018 10:10 AM
      1008423 Installation path for modules sometimes not matching Unity version Closed 3/1/2018 4:40 PM
      1006842 Neither SyncVar hooks nor ClientRPC or Command attributed functions are being called when overridden Closed 2/27/2018 1:40 PM
      1003338 Bug reports conclude mostly without sufficent linkage to the necessary Unity version Closed 2/17/2018 4:20 PM
      996444 SendMessage cannot be called during Awake without using SendMessage Closed 2/2/2018 10:30 AM
      994351 preprocessor directive UNITY_DEVELOPMENT not working in UWP Closed 1/29/2018 12:30 PM
      993072 Breaking Prefab instance for missing prefab shows Select and Revert Closed 1/26/2018 12:20 PM
      991304 CommandAttribute does not fire on server when using uint as parameter Closed 1/23/2018 5:10 PM
      986030 The server does not spawn a connecting client's player the second time he connects Closed 1/9/2018 9:40 PM
      984157 [MRDev] GestureRecognizer TryGetPosition/-Rotation does not change outcome using Motioncontroller Open 1/3/2018 9:00 AM
      978556 [MRDev] Warnings and wrong InteractionManager events when MotionController is out of view Closed 12/14/2017 10:00 AM
      970761 MR Motion Controller positions are wrong when InputTracking.disablePositionalTracking is true Open 11/20/2017 3:10 PM
      970699 Pressing Play with MR Portal getting ready freezes Unity Closed 11/20/2017 11:50 AM
      964986 Animation Create New Clip is missing when the current selected clip is read only Closed 11/2/2017 4:40 PM
      964561 UWP App built with Mixed Reality Support crashes without HMD connected Closed 11/1/2017 9:20 AM
      956326 Field selection of any inspector field is disabled when tabbed into it Closed 10/4/2017 1:20 PM