...
This commit is contained in:
@@ -29,7 +29,7 @@ namespace RebootKit.Engine.Simulation {
|
||||
public const int k_DefaultMessageSize = 256;
|
||||
|
||||
public static NativeArray<byte> Serialize<TEntity>(TEntity entity,
|
||||
Allocator allocator = Allocator.Temp)
|
||||
Allocator allocator = Allocator.Temp)
|
||||
where TEntity : ISerializableEntity {
|
||||
int size = entity.MinimumSizeInBytes();
|
||||
if (size < 0) {
|
||||
@@ -130,10 +130,42 @@ namespace RebootKit.Engine.Simulation {
|
||||
|
||||
[NonSerialized] internal IActorData Data;
|
||||
|
||||
[SerializeField] string m_ActorName = "";
|
||||
|
||||
public string ActorName {
|
||||
get {
|
||||
return m_ActorName;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct AttachmentSocket {
|
||||
public string socketName;
|
||||
public Transform root;
|
||||
|
||||
public Vector3 localPosition;
|
||||
public Quaternion localRotation;
|
||||
}
|
||||
|
||||
[SerializeField] AttachmentSocket[] m_AttachmentSockets;
|
||||
|
||||
public bool IsDataDirty { get; protected internal set; }
|
||||
|
||||
internal ActorsManager Manager;
|
||||
|
||||
public bool IsHidden() {
|
||||
return !gameObject.activeSelf;
|
||||
}
|
||||
|
||||
public void SetHidden(bool hidden) {
|
||||
if (!RR.IsServer()) {
|
||||
s_ActorLogger.Error($"Only the server can set actor visibility. Actor: {name} (ID: {ActorID})");
|
||||
return;
|
||||
}
|
||||
|
||||
Manager.SetActorHidden(ActorID, hidden);
|
||||
}
|
||||
|
||||
internal IActorData InternalCreateActorData() {
|
||||
return CreateActorData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user