Skip to content

Commit

Permalink
Merge branch 'release/2023.4.22'
Browse files Browse the repository at this point in the history
  • Loading branch information
Leopotam committed Apr 22, 2023
2 parents 38759b9 + 7a7d0cf commit 6b83a51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"displayName": "LeoECS Lite",
"description": "LeoECS Lite - легковесный ECS-фреймворк, основанный на структурах. Производительность, нулевые или минимальные аллокации, минимизация использования памяти, отсутствие зависимостей от любого игрового движка - это основные цели данного фреймворка.",
"unity": "2020.3",
"version": "2023.3.22",
"version": "2023.4.22",
"keywords": [
"leoecslite",
"leoecs",
Expand Down
4 changes: 2 additions & 2 deletions src/components.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ object IEcsPool.GetRaw (int entity) {

void IEcsPool.SetRaw (int entity, object dataRaw) {
#if DEBUG && !LEOECSLITE_NO_SANITIZE_CHECKS
if (dataRaw == null || dataRaw.GetType () != _type) { throw new Exception ("Invalid component data, valid \"{typeof (T).Name}\" instance required."); }
if (dataRaw == null || dataRaw.GetType () != _type) { throw new Exception ($"Invalid component data, valid \"{typeof (T).Name}\" instance required."); }
if (_sparseItems[entity] <= 0) { throw new Exception ($"Component \"{typeof (T).Name}\" not attached to entity."); }
#endif
_denseItems[_sparseItems[entity]] = (T) dataRaw;
}

void IEcsPool.AddRaw (int entity, object dataRaw) {
#if DEBUG && !LEOECSLITE_NO_SANITIZE_CHECKS
if (dataRaw == null || dataRaw.GetType () != _type) { throw new Exception ("Invalid component data, valid \"{typeof (T).Name}\" instance required."); }
if (dataRaw == null || dataRaw.GetType () != _type) { throw new Exception ($"Invalid component data, valid \"{typeof (T).Name}\" instance required."); }
#endif
ref var data = ref Add (entity);
data = (T) dataRaw;
Expand Down

0 comments on commit 6b83a51

Please sign in to comment.