Universal Data Type

Does there exist a ‘universal’ data type that includes everything? I’m aware of Objects that include most Unity things, but is there one that would include floats, ints and native types? I want to be able to have a list of anything, from vectors, class instances, strings, everything. This list should be able to store different data types all at the same time, and I would cast them when reading.
Is this possible?

Yes, there is. It’s just the “object” type from which all types are derived from. It’s actually the System.Object type but object is an alias name. However note that value types will be “boxed” when you store them in an object variable. When you box a value type the runtime will create an actual wrapper object (box) on the heap and store the value type in that wrapper. This is necessary since objects are always reference types. Apart that you get a slight performance impact when boxing / unboxing a valuetype, the box / wrapper itself will allocate memory on the heap which would produce garbage once it’s no longer used.

Can you give an example for what or how you want to use such an array / List? Storing completely different and unconnected things in a single array usually indicates a design problem.

Be aware that there is the UnityEngine.Object base type and the System.Object / object type. They are not the same. Actually Unity’s Object type is derived from System.Object, like every type. Also note that boxed value types have to be unboxed with the normal cast operator. The as-cast obviously doesn’t work with value types.