Side Channel example brakes unity editor #SideChannel

Hi,
I’m trying to use side channel with the unity editor
I’m using build 15.0 release on windows 10 home with anaconda.
I’m able to connect with the unity and example Ball3D, but when I’m trying to add a side channel and connect to the env using the python API and jupyter notebook, the editor get stuck (need to kill process) and the
get timeout in the notebook.

I’ve used the code example from the docs to create a new SttringLogSideChannel
In the unity side and in the python side as shown in the costume side channel.
Also in this release, the SideChannelUtils class was removed so I had to create it.

any assistance will help.
thanks!

figured out the issue, the documentation is wrong.
in Custom-SideChannels.md the RegisterStringLogSideChannel is using a removed class, and the class you need to register to is the Academy.

public class RegisterStringLogSideChannel : MonoBehaviour
{

    StringLogSideChannel stringChannel;
    public void Awake()
    {
        // We create the Side Channel
        stringChannel = new StringLogSideChannel();

        // When a Debug.Log message is created, we send it to the stringChannel
        Application.logMessageReceived += stringChannel.SendDebugStatementToPython;

        // The channel must be registered with the SideChannelUtils class
        SideChannelUtils.RegisterSideChannel(stringChannel);
    }

    public void OnDestroy()
    {
        // De-register the Debug.Log callback
        Application.logMessageReceived -= stringChannel.SendDebugStatementToPython;
        if (Academy.IsInitialized){
            SideChannelUtils.UnregisterSideChannel(stringChannel);
        }
    }

it should be:

public class RegisterStringLogSideChannel : MonoBehaviour
{
    Academy academy;
    StringLogSideChannel stringChannel;
    public void Awake()
    {
        // We create the Side Channel
        stringChannel = new StringLogSideChannel();

        // When a Debug.Log message is created, we send it to the stringChannel
        Application.logMessageReceived += stringChannel.SendDebugStatementToPython;

        // The channel must be registered with the SideChannelUtils class
      academy = Academy.Instance;
      academy.RegisterSideChannel(sideChannel);
    }

    public void OnDestroy()
    {
        // De-register the Debug.Log callback
        Application.logMessageReceived -= stringChannel.SendDebugStatementToPython;
        if (Academy.IsInitialized){
            academy.UnregisterSideChannel(stringChannel);
        }
    }

I’ll flag this for the team! Thanks!

You seem to be using v0.15.0 but looking at the documentation on master. Please use the v0.15.0 documentation :

1 Like