#How to get the size /amount of components from a component lookup

1 messages · Page 1 of 1 (latest)

tired hollow
#

So basicly I want to create a nativeArray with a size of all the components of certain type.

silver gulch
tired hollow
#

Exactly

#

And currently I use componentLookups but I noticed there is no size, count or length method

#

Nevermind

silver gulch
#

you need to create query and get that info from that

tired hollow
#

Ah I see

#

Wait but what does the componentlookup thing contain

#

Nothing? Is it just a wrapper

silver gulch
#

nothing, it's a wrapper for component access

tired hollow
#

Yeah I see

silver gulch
#

internally it contains pointer to access any component data

tired hollow
#

Yeah okay I see

#

Okay thankss!

silver gulch
#

but to make multithreading safe, it's used as NativeContainer wrapper that works with Job safety

#

so you'll get exceptions and such if you try to use it wrong