Hi,
I am attempting to instantiate/spawn a network object / network behaviour and perform some logic on it client side via observers rpc. (1st image)
The 1st thing I need to do is set its parent as when its instantiated over the network it is placed at the root of the scene, which is not what I want as it needs to be attached to its parent (2nd image).
It has a buffer last value set to true so joining clients receive this information and are not out of sync.
The Network object that is being spawned on the network is stored on both server and client as a serialized field via the ability manager. the ability manager is cached on Awake, OnStartClient, and OnStartServer (for testing purposes... I was scratching my head thinking it was a reference issue regarding this... but I guess it isnt)
When it hits the 1st function (SetParent) it works on the host with no issues, but a joining client will receive a null reference exception at the point of log.
This issue does not exist if I move the Network object i.e. Ability to the calling class as a serialized field. The function executes successfully. It also executes successfully if I use a data container i.e. scriptable object for reference. I believe based on tests that this an issue with calling a function on another script for retrieving the instantiated object.
Also, if I see on the client, the original reference to the abilityManager.Abilities[0] disappears strangely. I do not know the cause for this, as Im not destroying any objects in this code block. I am assuming this is the cause for the null reference error.
I am on version 3.6.9 pro, however this was occuring before I updated from 2.3.14 pro