Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 22 21:04

    Leopotam on v20190822

    (compare)

  • Aug 22 21:04

    Leopotam on develop

    * README: Unity runtime support… Merge branch 'release/v20190822' Merge tag 'v20190822' into deve… (compare)

  • Aug 22 21:04

    Leopotam on master

    Merge tag 'v20190722' into deve… * EcsFilter: Fix utf8 BOM heade… * UnityPackage version bump. and 6 more (compare)

  • Aug 12 12:22

    Leopotam on develop

    * README: Info about Unity Mono… (compare)

  • Aug 12 12:16

    Leopotam on develop

    Revert "* EcsFilter: Possible i… (compare)

  • Aug 10 15:21

    Leopotam on develop

    * EcsFilter: Possible invalid I… (compare)

  • Jul 26 21:06

    Leopotam on develop

    * UnityPackage version bump fix. (compare)

  • Jul 26 21:06

    Leopotam on develop

    * UnityPackage version bump. (compare)

  • Jul 26 21:01

    Leopotam on develop

    * EcsFilter: Fix utf8 BOM heade… (compare)

  • Jul 22 08:55

    Leopotam on v20190722

    (compare)

  • Jul 22 08:55

    Leopotam on develop

    * UnityPackage version bump. Merge branch 'release/v20190722' Merge tag 'v20190722' into deve… (compare)

  • Jul 22 08:55

    Leopotam on master

    Merge tag 'v20190622' into deve… * EcsWorld: Performance fix on … * UnityPackage version bump. and 1 more (compare)

  • Jun 27 12:27

    Leopotam on develop

    * EcsWorld: Performance fix on … (compare)

  • Jun 22 08:35

    Leopotam on master

    Merge tag 'v20190522' into deve… EcsFilter T4 template Missing file added and 6 more (compare)

  • Jun 22 08:35

    Leopotam on develop

    Merge branch 'release/v20190622' Merge tag 'v20190622' into deve… (compare)

  • Jun 22 08:35

    Leopotam on v20190622

    (compare)

  • Jun 22 08:33

    Leopotam on develop

    * UnityPackage version bump. (compare)

  • Jun 21 18:36

    Leopotam on develop

    * EcsSystems: ProcessInjects() … (compare)

  • Jun 13 17:30

    Leopotam on develop

    * EcsFilter: obsoleted methods … (compare)

  • Jun 13 16:52

    Leopotam on develop

    * EcsFilter: Fix unity metafile… (compare)

Leopotam
@Leopotam
because DI is common way for sharing
you can extend EcsWorld as before, but i will not recommend to do it as part of README
justStand
@justStand
Why .inject > world.data
Leopotam
@Leopotam
why not
its unified way to inject class instances at systems already, why you need to create custom world type if you will use DI anyway?
justStand
@justStand
With .inject, what if you have multiple injections of same datatype that not all systems need
Leopotam
@Leopotam
you cant inject same type in multiple ways, you should to do this manually some how (through ctor for ex)
if you want to inject instance of type but not at all compatible fields - you can mark field with attribute Ecs
EcsIgnoreInject
its stupid simplest DI, if you need more complex behaviour
you should to create it by yourself
stupid mobile keyboard, sends message on attempt to move cursor position...
justStand
@justStand
Using a mobile keyboard in the first place.
purestrain
@purestrain
Hi there; i was long time not updating / following leoECS. I missed the transition between "int" and "EcsEntity" - i think this is done because of reused IDs which i had some trouble with.
purestrain
@purestrain
do i have to update every usage of old integers to EcsEntity? And can i finally skip some custom logic for "reused / obsolete" entity-ids ? How am i supposed to store these in database, i don't see a constructor for creating a specific ID using a constructor.
Leopotam
@Leopotam

I missed the transition between "int" and "EcsEntity"

i suggest to update versions one by one with fixing obsolete warnings - compiler will show you all places to update (ints to EcsEntity for ex)

can i finally skip some custom logic for "reused / obsolete" entity-ids ?

you cant, all obsolete warnings will be turned to errors in each next release (one version delay)

How am i supposed to store these in database, i don't see a constructor for creating a specific ID using a constructor.

you cant store entities in any way outside from EcsWorld due ids / gens not fixed even inside EcsWorld (will be reused by logic operations)

you should store custom guids with components info to serialize / deserialize them somehow
its why there are no ctor at EcsEntity
Leopotam
@Leopotam
think about entities like about pointers to unmanaged memory that you cant touch / change / copy
Leopotam
@Leopotam
ecs, ecs-types, globals repos updated to v20190622 release
RUSshy
@RUSshy
@Leopotam today i discovered that if use in for passing struct, it'll make code slower if the struct isn't struct readonly MyStruct http://faithlife.codes/blog/2017/12/in-will-make-your-code-slower/
Leopotam
@Leopotam
@RUSshy you discovered or just read article? did you test it by yourself? in modifier works faster if struct doesnt change inside and used as readonly source
you can even try to change field inside method - compiler will show you error
there is one issue - you can change nested struct at struct
then value will be cloned as before
just dont change it inside method where you used in and all will be good
Belfegnar
@Belfegnar
*and replace all properties with fields, otherwise magic will not work=)
Because properties are implemented as methods in the end, right? And the compiler does not know whether you change the structure inside property or not. As a result, for each call of any property / method of the in-struct, you get a copy of it.
Leopotam
@Leopotam
well, i dont use any properties in math structs at all :)
ecs-unityintegration repo updated: fix exception on rendering removed / reused entity at same frame.
ecs repo updated: Performance fix on removing component from entity (move last component for filling gap instead moving whole array tail).
Belfegnar
@Belfegnar
Have you checked all of your methods for running other methods / properties inside? Operators are also considered as methods (create a copy), if I understand it right.
Leopotam
@Leopotam
well, i compared performance for standard math (Vector3, etc) and ecs-types math (Float3) for same operations - in version was faster even with operators overriding
looks like static methods have no problems here
Belfegnar
@Belfegnar
It can also mean that unitytecs are doing something even slower than a slow one=) Not very comforting.
Leopotam
@Leopotam
well, they wrote their code when fw3.5 was mainstream
in modifier was added at c#7.2 only
but under burst compiler both version works in same or very close performance, you checked it, do you remember?
Belfegnar
@Belfegnar
By the way, did you notice that they wrapped all fields (as x,y,..etc) as properties of new vectors, such as Vector3Int, unlike the old ones? I wonder why.
Leopotam
@Leopotam
because they are idiots
hired indians that worked on enterprise code before
you can find that Int2 to Vector2Int conversion at ecs-types works through new Vector2int(x,y); instead direct initialization of struct fields (no ctor call - faster)
its because you cant initialize private fields somehow but through ctor only
all new code from 5.5 wrote by indians
ugui - fucking slow
new types - not optimized for gamedev
new srp render pipeline works with memory allocation each frame!
Leopotam
@Leopotam
new ecs requires additional 30% code. stupid garbage code just for wrapping