BehaviourSyncMode.NoVariableSync works like BehaviourSyncMode.None
available in future release
みみー/Mimy
In VRCSDK 3.8.1-beta.2
Client 1628
Udonsharp components with BehaviourSyncMode.NoVariableSync cannot send or receive SendCustomNetworkEvent for public methods with the [NetworkCalling] attribute .
From the Network ID Utility, we have confirmed that a Network ID has been assigned to this object.
The expected behavior for NoVariableSync is to be able to send and receive SendCustomNetworkEvents without having [UdonSynced] variables.
If there is another Udon component with BehaviourSyncMode.Continues or BehaviourSyncMode.Manual, it will be send and receive. This is the expected action.
Currently, if you only want to send and receive SendCustomNetworkEvents, it is useful to set BehaviourSyncMode.Manual. However, if, for example, you want to attach VRCObjectSync together, you have to switch to Continuous. If the author of the script and the user are different, you must leave it at BehaviourSyncMode.Any and let the user of the script decide, which is uncontrollable by the author of the script.
Translated with www.DeepL.com/Translator (free version)
Log In
_
_tau_
available in future release
Documentation will be updated.
_
_tau_
needs more information
Could you share a script and hierarchy setup that reproduces this issue? In my testing, a script using
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
can send events just fine.みみー/Mimy
_tau_
Okay, I created two objects with two Udonsharp scripts and observed what happens when a network event is sent from the Sender to the Receiver.
I was able to send and receive SendCustomNetworkEvent if the receiver side is NoVariableSync. (1st SS)
...and even if the sender is None!
This is at odds with the documentation. What is the correct answer?
If the receiver is None, SendCustomNetworkEvent failed to send. This is the expected behavior. (2nd SS)
みみー/Mimy
Scripts used in this test.
--------------- SCNETestReceiver.cs -----------------
using UdonSharp;
using UnityEngine;
using VRC.SDK3.UdonNetworkCalling;
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class SCNETestReceiver : UdonSharpBehaviour
{
public void LegacySCNEAll()
{
Debug.Log($"Receive Legacy SendCustomNetworkEvent: All");
}
public void LegacySCNEOwner()
{
Debug.Log($"Receive Legacy SendCustomNetworkEvent: Owner");
}
public void LegacySCNEOthers()
{
Debug.Log($"Receive Legacy SendCustomNetworkEvent: Others");
}
public void LegacySCNESelf()
{
Debug.Log($"Receive Legacy SendCustomNetworkEvent: Self");
}
[NetworkCallable]
public void CallableSCNEAll()
{
Debug.Log($"Receive Callable SendCustomNetworkEvent: All");
}
[NetworkCallable]
public void CallableSCNEOwner()
{
Debug.Log($"Receive Callable SendCustomNetworkEvent: Owner");
}
[NetworkCallable]
public void CallableSCNEOthers()
{
Debug.Log($"Receive Callable SendCustomNetworkEvent: Others");
}
[NetworkCallable]
public void CallableSCNESelf()
{
Debug.Log($"Receive Callable SendCustomNetworkEvent: Self");
}
}
みみー/Mimy
--------------- SCNETestSender.cs -----------------
using UdonSharp;
using UnityEngine;
using VRC.Udon.Common.Interfaces;
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class SCNETestSender : UdonSharpBehaviour
{
public SCNETestReceiver target;
public override void Interact()
{
Debug.Log($"Interact: {this.gameObject.name}");
target.SendCustomNetworkEvent(NetworkEventTarget.All, nameof(SCNETestReceiver.LegacySCNEAll));
Debug.Log($"Send Legacy SendCustomNetworkEvent: All");
target.SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(SCNETestReceiver.LegacySCNEOwner));
Debug.Log($"Send Legacy SendCustomNetworkEvent: Owner");
target.SendCustomNetworkEvent(NetworkEventTarget.Others, nameof(SCNETestReceiver.LegacySCNEOthers));
Debug.Log($"Send Legacy SendCustomNetworkEvent: Others");
target.SendCustomNetworkEvent(NetworkEventTarget.Self, nameof(SCNETestReceiver.LegacySCNESelf));
Debug.Log($"Send Legacy SendCustomNetworkEvent: Self");
target.SendCustomNetworkEvent(NetworkEventTarget.All, nameof(SCNETestReceiver.CallableSCNEAll));
Debug.Log($"Send Callable SendCustomNetworkEvent: All");
target.SendCustomNetworkEvent(NetworkEventTarget.Owner, nameof(SCNETestReceiver.CallableSCNEOwner));
Debug.Log($"Send Callable SendCustomNetworkEvent: Owner");
target.SendCustomNetworkEvent(NetworkEventTarget.Others, nameof(SCNETestReceiver.CallableSCNEOthers));
Debug.Log($"Send Callable SendCustomNetworkEvent: Other");
target.SendCustomNetworkEvent(NetworkEventTarget.Self, nameof(SCNETestReceiver.CallableSCNESelf));
Debug.Log($"Send Callable SendCustomNetworkEvent: Self");
}
}
_
_tau_
みみー/Mimy: Ah, I see the confusion! The docs are in fact incorrect here, only the receiver behaviour must not be SyncType None. The sender type is actually irrelevant.
I will adjust the documentation accordingly.
With that in mind, is there still unexplained behaviour or a bug, or does that clear it up?
みみー/Mimy
_tau_So far it is working as expected. Thank you.