手册
脚本 API
unity3d.com
Version:
2017.4
2021.1
2020.3
2020.2
2020.1
2019.4
2019.3
2019.2
2019.1
2018.4
2018.3
2018.2
2018.1
2017.4
2017.3
2017.2
2017.1
5.6
包含此页的版本:
不含此页的版本:
受支持
旧版
手册
脚本 API
语言:
中文
English
中文
日本語
Español
한국어
Русский
脚本 API
Version:
2017.4
2021.1
2020.3
2020.2
2020.1
2019.4
2019.3
2019.2
2019.1
2018.4
2018.3
2018.2
2018.1
2017.4
2017.3
2017.2
2017.1
5.6
包含此页的版本:
不含此页的版本:
受支持
旧版
NetworkWriter
.Write
切换到手册
public void
Write
(char
value
);
public void
Write
(byte
value
);
public void
Write
(sbyte
value
);
public void
Write
(short
value
);
public void
Write
(ushort
value
);
public void
Write
(int
value
);
public void
Write
(uint
value
);
public void
Write
(long
value
);
public void
Write
(ulong
value
);
public void
Write
(float
value
);
public void
Write
(double
value
);
public void
Write
(Decimal
value
);
public void
Write
(string
value
);
public void
Write
(bool
value
);
public void
Write
(byte[]
buffer
, int
count
);
public void
Write
(byte[]
buffer
, int
offset
, int
count
);
public void
Write
(
Vector2
value
);
public void
Write
(
Vector3
value
);
public void
Write
(
Vector4
value
);
public void
Write
(
Color
value
);
public void
Write
(
Color32
value
);
public void
Write
(
GameObject
value
);
public void
Write
(
Quaternion
value
);
public void
Write
(
Rect
value
);
public void
Write
(
Plane
value
);
public void
Write
(
Ray
value
);
public void
Write
(
Matrix4x4
value
);
public void
Write
(
Networking.MessageBase
msg
);
public void
Write
(
Networking.NetworkHash128
value
);
public void
Write
(
Networking.NetworkIdentity
value
);
public void
Write
(
Networking.NetworkInstanceId
value
);
public void
Write
(
Networking.NetworkSceneId
value
);
public void
Write
(
Transform
value
);
参数
value
要写入的对象。
buffer
要写入的字节缓冲区。
count
要在字节缓冲区中写入的字节数。
offset
要从其开始写的字节缓冲区数组元素。
msg
要写入的网络消息。
描述
此函数将引用写入对象、值、缓冲区或网络消息,并与 NetworkIdentity 组件相结合将引用写入流中。