Help with basic variable byte

why cant i do this? How can i do this:

byte levelData[x, y, z] = gameObject;

-1

Uhm your code makes no sense at all so the simple answer is:

Not at all

Some more points:

  • Having the type “byte” in front of an identifier usually declares a variable of type “byte”.
  • When declaring a type you can’t use indexing brackets on the name at the same time. If you want to declare an array the brackets belong to the type.
  • In case the “byte” word is removed the line of code would be valie if levelData is a 3 dimensional array of GameObject. However if it’s a 2d array of byte values you can’t store a GameObject in it.

All in all your question makes no sense at all. You should explain what you want to do because we can’t derive that from that code snippet.