Browse Source

RELAXED_ECS wasn't relaxed enough

tags/2.7
sebas77 5 years ago
parent
commit
4e40ba02b2
7 changed files with 14 additions and 23 deletions
  1. +4
    -4
      Svelto.ECS/CheckEntityUtilities.cs
  2. +1
    -1
      Svelto.ECS/EnginesRoot.Engines.cs
  3. +6
    -11
      Svelto.ECS/EnginesRoot.Entities.cs
  4. +1
    -1
      Svelto.ECS/EnginesRoot.GenericEntityFunctions.cs
  5. +1
    -1
      Svelto.ECS/EnginesRoot.Submission.cs
  6. +0
    -4
      Svelto.ECS/EntityBuilder.CheckFields.cs
  7. +1
    -1
      Svelto.ECS/EntityViewUtility.cs

+ 4
- 4
Svelto.ECS/CheckEntityUtilities.cs View File

@@ -28,7 +28,7 @@ namespace Svelto.ECS
}
else
{
Utilities.Console.LogError("Entity ".FastConcat(" with not found ID is about to be removed: ")
Console.LogError("Entity ".FastConcat(" with not found ID is about to be removed: ")
.FastConcat(" id: ")
.FastConcat(entityID.entityID)
.FastConcat(" groupid: ")
@@ -46,7 +46,7 @@ namespace Svelto.ECS
{
if (entities.Has(entityID.entityID) == false)
{
Utilities.Console.LogError("Entity ".FastConcat(name, " with not found ID is about to be removed: ")
Console.LogError("Entity ".FastConcat(name, " with not found ID is about to be removed: ")
.FastConcat(entityType)
.FastConcat(" id: ")
.FastConcat(entityID.entityID)
@@ -56,7 +56,7 @@ namespace Svelto.ECS
}
else
{
Utilities.Console.LogError("Entity ".FastConcat(name, " with not found ID is about to be removed: ")
Console.LogError("Entity ".FastConcat(name, " with not found ID is about to be removed: ")
.FastConcat(entityType)
.FastConcat(" id: ")
.FastConcat(entityID.entityID)
@@ -93,7 +93,7 @@ namespace Svelto.ECS
{
if (entities.Has(entityID.entityID) == true)
{
Utilities.Console.LogError("Entity ".FastConcat(name, " with used ID is about to be built: ")
Console.LogError("Entity ".FastConcat(name, " with used ID is about to be built: ")
.FastConcat(entityType)
.FastConcat(" id: ")
.FastConcat(entityID.entityID)


+ 1
- 1
Svelto.ECS/EnginesRoot.Engines.cs View File

@@ -69,7 +69,7 @@ namespace Svelto.ECS
#if !DEBUG
throw new ECSException("Code crashed while adding engine ".FastConcat(engine.GetType()), e);
#else
Utilities.Console.LogException("Code crashed while adding engine ".FastConcat(engine.GetType()), e);
Console.LogException("Code crashed while adding engine ".FastConcat(engine.GetType()), e);
#endif
}
}


+ 6
- 11
Svelto.ECS/EnginesRoot.Entities.cs View File

@@ -27,7 +27,7 @@ namespace Svelto.ECS
}
catch (Exception e)
{
Utilities.Console.LogException(e);
Console.LogException(e);
}
}

@@ -38,7 +38,7 @@ namespace Svelto.ECS
}
catch (Exception e)
{
Utilities.Console.LogException(e);
Console.LogException(e);
}
}

@@ -47,7 +47,7 @@ namespace Svelto.ECS

~EnginesRoot()
{
Utilities.Console.LogWarning("Engines Root has been garbage collected, don't forget to call Dispose()!");
Console.LogWarning("Engines Root has been garbage collected, don't forget to call Dispose()!");
Dispose();
}
@@ -158,16 +158,11 @@ namespace Svelto.ECS
#if DEBUG && !PROFILER
if (correctEntityDescriptorFound == false)
#if RELAXED_ECS
Utilities.Console.LogError(INVALID_DYNAMIC_DESCRIPTOR_ERROR
Console.LogError(INVALID_DYNAMIC_DESCRIPTOR_ERROR
.FastConcat(" ID ").FastConcat(entityGID.entityID)
.FastConcat(" group ID ").FastConcat(entityGID.groupID).FastConcat(
" descriptor found: ",
entityInfoView
.type
.Name,
" descriptor Excepted ",
originalDescriptorType
.Name));
" descriptor found: ", entityInfoView.type.Name,
" descriptor Excepted ", originalDescriptorType.Name));
#else
throw new ECSException(INVALID_DYNAMIC_DESCRIPTOR_ERROR.FastConcat(" ID ").FastConcat(entityGID.entityID)
.FastConcat(" group ID ").FastConcat(entityGID.groupID).FastConcat(


+ 1
- 1
Svelto.ECS/EnginesRoot.GenericEntityFunctions.cs View File

@@ -100,7 +100,7 @@ namespace Svelto.ECS
entitySubmitOperation.trace = Environment.StackTrace;
var egid = new EGID(entitySubmitOperation.ID, entitySubmitOperation.fromGroupID);
if (_entitiesOperationsDebug.ContainsKey((long)egid) == true)
Utilities.Console.LogError("Only one entity operation per submission is allowed. Entity "
Console.LogError("Only one entity operation per submission is allowed. Entity "
.FastConcat(" with not found ID is about to be removed: ")
.FastConcat(" id: ")
.FastConcat(entitySubmitOperation.ID)


+ 1
- 1
Svelto.ECS/EnginesRoot.Submission.cs View File

@@ -5,7 +5,7 @@ using Svelto.DataStructures;
using Svelto.DataStructures.Experimental;
using Svelto.ECS.Internal;
using Svelto.ECS.Schedulers;
using Console = Svelto.Utilities.Console;
using Console = Svelto.Console;

namespace Svelto.ECS
{


+ 0
- 4
Svelto.ECS/EntityBuilder.CheckFields.cs View File

@@ -108,10 +108,6 @@ namespace Svelto.ECS
{
#if !RELAXED_ECS
throw new EntityStructException(message, ENTITY_VIEW_TYPE, type);
#else
Utilities.Console.LogError("Invalid entity view detected - EntityViews must handle only value types and have " +
"no public methods! EntityView ".FastConcat(ENTITY_VIEW_NAME).FastConcat(
" invalid field: ", type.ToString()));
#endif
}


+ 1
- 1
Svelto.ECS/EntityViewUtility.cs View File

@@ -52,7 +52,7 @@ static class EntityViewUtility
#if DEBUG && !PROFILER
else
{
Svelto.Utilities.Console.Log(NULL_IMPLEMENTOR_ERROR.FastConcat(" entityView ",
Svelto.Console.Log(NULL_IMPLEMENTOR_ERROR.FastConcat(" entityView ",
entityBuilder.GetEntityType().ToString()));
}
#endif


Loading…
Cancel
Save