|
|
@@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using RobocraftX.Common; |
|
|
|
using Svelto.ECS; |
|
|
|
using Svelto.ECS.Serialization; |
|
|
|
|
|
|
@@ -9,12 +10,12 @@ namespace GamecraftScripting.Serialization |
|
|
|
[HashName("GamecraftScriptingScriptEntityDescriptorV0")] |
|
|
|
public class _ScriptEntityDescriptor : IEntityDescriptor |
|
|
|
{ |
|
|
|
public IEntityBuilder[] entitiesToBuild => _entityBuilders; |
|
|
|
public IComponentBuilder[] componentsToBuild => _entityBuilders; |
|
|
|
|
|
|
|
private static readonly IEntityBuilder[] _entityBuilders = new IEntityBuilder[1] |
|
|
|
private static readonly IComponentBuilder[] _entityBuilders = new IComponentBuilder[1] |
|
|
|
{ |
|
|
|
new SerializableEntityBuilder<ScriptStruct>((SerializationType.Network, new ScriptSerializer()), |
|
|
|
(SerializationType.Storage, new ScriptSerializer())) |
|
|
|
new SerializableComponentBuilder<SerializationType, ScriptStruct>(((int)SerializationType.Network, new ScriptSerializer()), |
|
|
|
((int)SerializationType.Storage, new ScriptSerializer())) |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
@@ -22,7 +23,7 @@ namespace GamecraftScripting.Serialization |
|
|
|
{ |
|
|
|
GamecraftModdingAPI.Utility.Logging.MetaLog("ScriptEntityDescriptor Initialized"); |
|
|
|
GamecraftModdingAPI.Utility.Logging.MetaLog($"Entities to serialize: {entitiesToSerialize.Length}"); |
|
|
|
GamecraftModdingAPI.Utility.Logging.MetaLog($"Entities to serialize: {entitiesToBuild.Length}"); |
|
|
|
GamecraftModdingAPI.Utility.Logging.MetaLog($"Entities to serialize: {componentsToBuild.Length}"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |