I’m trying to spawn a game object in the place where the player clicked. I’ve gathered that I can do that with factory.create(). I can confirm that line of code executes via some print statements, but the game object just doesn’t show. I modeled it after the Sidescroller tutorial.
I’ve looked around for settings or things I can adjust, but I can’t find anything that seems relevant. I suspect it’s something wrong with the sprite/atlas because the object doesn’t show even when I manually add it to main.collection and drag it right to the center of the screen. Doesn’t show in the editor either–just gives me a small 32x32 box.
I’ve noticed that the atlas has size 64x64, but my sprite is 32x32. Is that a potential factor? I can’t change the size on the atlas to find out.
EDIT: To clarify, the z-values on all of my objects are left at default, so they should all be zero. I checked them all again just now to confirm that’s the case.
Silly suggestion, but have you added the sprite to the game object? You say you don’t see it in the editor, but you do see it in the game object right?
You can change the range of z-values that will render in the render script:
Also note that the z-value is the aggregated z-value of the game object and component z-values and also including the z-value of any parent game object: