-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split and improve side channel / LL-API documentation #3574
Conversation
docs/Custom-SideChannels.md
Outdated
@@ -0,0 +1,190 @@ | |||
# Custom Side Channels | |||
|
|||
You can create your own side channel in C# and Python and use it to communicate custom data structures between the two. This can be useful for situations in which the information to be sent is too complex or structured for the built-in `FloatPropertiesChannel`, or too one-off to be appropriate as an agent observation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you can say information is "too structured" or "too one-off".
docs/Custom-SideChannels.md
Outdated
} | ||
``` | ||
|
||
Once we have defined our custom side channel class, we need to ensure that it is instantiated and registered. This can typically be done wherever the logic of the side channel makes sense to be associated, for example on a monobehavior object that might need to access data from the side channel. Here we show a simple MonoBehavior object which instantiates and registeres the new side channel. If you have not done it already, make sure that the monobehavior which registers the side channel is connected to a gameobject which will be live in your Unity scene. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should split the lines that are too long.
monobehavior
--> MonoBehaviour
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
connected
--> attached
docs/Custom-SideChannels.md
Outdated
// When a Debug.Log message is created, we send it to the stringChannel | ||
Application.logMessageReceived += stringChannel.SendDebugStatementToPython; | ||
|
||
// Just in case the Academy has not yet initialized |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what this comment means, this is the only way to register the side channel on C#
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha. You wrote it :) Happy to remove/change.
docs/Python-API.md
Outdated
Now, if you run this script and press `Play` the Unity Editor when prompted, The console in the Unity Editor will | ||
display a message at every Python step. Additionally, if you press the Space Bar in the Unity Engine, a message will | ||
appear in the terminal. | ||
For information on how to make custom side channels for sending additional data types, see the documentation [here](Custom-SideChannels.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dead link. I think ../Custom-SideChannels.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is weird. They all seem to work for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All right my bad, if the markdown check says yes then yes
Co-Authored-By: Vincent-Pierre BERGES <vincentpierre@unity3d.com>
…echnologies/ml-agents into develop-sidechannel-docs
Proposed change(s)
Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)
Types of change(s)
Checklist
Other comments