Skip to content

add transport for PICO devices #234

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Check our [contribution guidelines](CONTRIBUTING.md) for information on how to c
|**[Photon Realtime](/Transports/com.community.netcode.transport.photon-realtime)**| Desktop, Mobile, WebGL\** | :heavy_check_mark: | :heavy_check_mark: | |
|**[Facepunch](/Transports/com.community.netcode.transport.facepunch)**| Steam | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
|**[Multipeer Connectivity](/Transports/com.community.netcode.transport.multipeer-connectivity)**| iOS | :heavy_check_mark: | :heavy_check_mark: | |
|**[Pico](/Transports/com.community.netcode.transport.pico)**| PICO ||| :heavy_check_mark: |

\* Needs manual binary compilation.<br>
\** Other platforms such as console platforms are also supported but require communication with Exit Games.
Expand Down
5 changes: 5 additions & 0 deletions Transports/com.community.netcode.transport.pico/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog
All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)

## 0.0.1
First version of the \<Pico\> transport as a Unity package.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Transports/com.community.netcode.transport.pico/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2021 Unity Technologies

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

202 changes: 202 additions & 0 deletions Transports/com.community.netcode.transport.pico/README.md

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

206 changes: 206 additions & 0 deletions Transports/com.community.netcode.transport.pico/README.zh-CN.md

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Transports/com.community.netcode.transport.pico/Runtime.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#if UNITY_EDITOR
using UnityEditor;
using Netcode.Transports.Pico;

namespace Netcode.Transport.Pico
{
[CustomEditor(typeof(PicoTransport))]
[CanEditMultipleObjects]
public class PicoTransportEditor : Editor
{
SerializedProperty _workMode;
SerializedProperty _independentInfo;
SerializedProperty _transportLogLevel;
void OnEnable()
{
_workMode = serializedObject.FindProperty("WorkMode");
_independentInfo = serializedObject.FindProperty("SimpleModeInfo");
_transportLogLevel = serializedObject.FindProperty("TransportLogLevel");
}

public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(_workMode);
EditorGUILayout.PropertyField(_transportLogLevel);
PicoTransport.SetLogLevel((PicoTransport.LogLevel)_transportLogLevel.enumValueIndex);
PicoTransport.EWorkMode tmpWorkMode = (PicoTransport.EWorkMode)_workMode.enumValueIndex;
switch (tmpWorkMode)
{
case PicoTransport.EWorkMode.ExternalRoom:
{
EditorGUILayout.LabelField("ExternalRoom Mode");
}
break;
case PicoTransport.EWorkMode.Simple:
{
EditorGUILayout.LabelField("Simple Mode");
EditorGUILayout.PropertyField(_independentInfo, true);
}
break;
default:
EditorGUILayout.LabelField("invalid work mode");
return;
}
serializedObject.ApplyModifiedProperties();
} //OnInspectorGUI()

}
}
#endif

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading