Build an array (gameobjects)? (instance error)

This seems pretty basic, but i cant seem to get the syntax right for it.

Im trying to build an array (variable gameobjects) and fill it with gameobjects (variable cube1, linked to a saved asset cube1).

But i keep getting the “object reference not set to an instance of the object.”

Not sure what the correct way to instantiate the object is, any ideas?

My experience so far with this was that you can’t use the object referenced on the output of the VRC Instantiate function. Perhaps if you’re duplicating an object, have the duplicated object collide into something and on that event, add it to a listing.
I was creating objects to spawn then die after time, referencing them like this wouldn’t work for me so I had to make a new code on the copied object that then got copied to the objects it created, which I’ve heard others had issues with, but it worked for me.


Interesting, okay ill play around with this and update.

Hey there, is this perhaps what you’re looking after?

You need to set up the size in the inspector:

1 Like

Yes! thank you!!
Really need a library or something to find these blocks better :sweat_smile: