cjhowe
cjhowe
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
BTW, this is like the 3rd or 4th language I've written this code in; it's definitely possible in C++. But not sure storing managed objects in unmanaged C++ memory is a great idea
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
I don't know if such a thing exists yet
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
In the future I will likely need to use something lower level than arrays...
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
Like, think of it this way: even if I know all combinations of components at compile time that are used with my functions, you can add two different sets of components to the same entity. So this means I can't determine the actual types an entity might have until runtime
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
I don't think so
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
Yes, that's pretty much unavoidable. I don't know component types in advanced
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
What I'm doing is a little out there, but it's pretty much a high performance parallel ECS. Since I will be running a great deal of queries on a great deal of entities, and I don't want to serialize all mutation, I want to allow in place edits of structs. This should be faster than using a class reference type I think?
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
And that's what I want
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
Array.CreateInstance(type, 2) can only store instances of type
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
object[] can store different types: [1, "hello", false]
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
Is it though?
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
You would only do this for this situation AFAIK
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
Nah, it's System.Array
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
Basically, I'm going to do queries that have to be high performance, that will let you mutate things in place (no adding/removing/moving components)
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
The adding/removing components is fine to use boxing
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
Well, it's okay for some operations in this case
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
This has to be fast, pretty much
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
Using generics, ref structs, etc.
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
Everything is type erased and yet I want to avoid boxing
73 replies
CC#
Created by cjhowe on 4/12/2024 in #help
Is it possible to use `Span` with a type erased `System.Array` created with `Array.CreateInstance`?
73 replies