您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
36 行
903 B
36 行
903 B
using Unity.Collections;
|
|
using Unity.Entities;
|
|
|
|
namespace Unity.NetCode.Extensions
|
|
{
|
|
/// <summary>
|
|
/// Stores the player's name
|
|
/// </summary>
|
|
public struct PlayerName : IComponentData
|
|
{
|
|
[GhostField] public FixedString64Bytes Name;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Stores bot's name
|
|
/// </summary>
|
|
public struct BotNameElement : IBufferElementData
|
|
{
|
|
public FixedString64Bytes Name;
|
|
}
|
|
|
|
public struct MultiversePlayerID : IComponentData
|
|
{
|
|
[GhostField] public FixedString64Bytes PlayerId;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Create an element to link the name and ID of the player online.
|
|
/// </summary>
|
|
public struct PlayerConnectedElement : IBufferElementData
|
|
{
|
|
public FixedString64Bytes Name;
|
|
public FixedString64Bytes PlayerId;
|
|
public Entity Value;
|
|
}
|
|
}
|