public override void OnReplicatedEvent(string serializedBEHandle) { //H deserializedBEHandle = JsonConvert.DeserializeObject<H>(serializedBEHandle); H deserializedBEHandle = BUtils.DeserializeObject <H>(serializedBEHandle); OnProceedInvokation(deserializedBEHandle); }
public void LoadRepObject() { if (replicatedObject == null) { if (IS_NOT_NULL(replicatedObjectPrefab)) { replicatedObject = Instantiate(replicatedObjectPrefab); } } string serializedBAnchorInformation = PlayerPrefs.GetString("TEST_Anchor", "Not_Init"); if (serializedBAnchorInformation == "Not_Init") { LogConsoleError("Trying to load a BAnchor that was never saved"); return; } //BAnchorInformation bAnchorInformation = JsonConvert.DeserializeObject<BAnchorInformation>(serializedBAnchorInformation); BAnchorInformation bAnchorInformation = BUtils.DeserializeObject <BAnchorInformation>(serializedBAnchorInformation); if (IS_NOT_NULL(bAnchorInformation)) { replicatedObject.SetTransformedPosition(bAnchorInformation.TransformedPosition); replicatedObject.SetTransformedRotation(bAnchorInformation.TransformedRotation); } }
public void OnBEventReplicated(string serializedBEHandle) { //AbstractBEHandle deserializedBEHandle = JsonConvert.DeserializeObject<AbstractBEHandle>(serializedBEHandle); AbstractBEHandle deserializedBEHandle = BUtils.DeserializeObject <AbstractBEHandle>(serializedBEHandle); string callingBEventName = deserializedBEHandle.InvokingBEventName; if ((IS_NOT_NULL(BEventsCollection.Instance.AllReplicatedBEvent)) && (IS_KEY_CONTAINED(BEventsCollection.Instance.AllReplicatedBEvent, callingBEventName)) && (IS_NOT_NULL(BEventsCollection.Instance.AllReplicatedBEvent[callingBEventName]))) { BEventsCollection.Instance.AllReplicatedBEvent[callingBEventName].OnReplicatedEvent(serializedBEHandle); } }