I am on module 6 of the User Cert course and I’m having trouble with the platform creator. I can’t get all the platforms to be created at the same Y axis on the screen. Also having overlap issues. I have 9 platform prefabs, but when they are randomly created, the orientation height is different for most of them, the larger ones overlap with the initial platform and/or other platforms, and the larger platforms are being destroyed before the player reaches the other side of that platform.
Ok, I did some testing… First open your first prefab platform, you should have the transform, box collider and platform script attached as components, ensure that your Position and Rotations are zero’d out and scale set to 1 for all axis. whatever your art work you used should be children underneath that gameobject. Each child should have a transform, sprite render and sprite-default material, you will need to line up the left side of the first image to the center y axis of the parent gameobject.
if you want to resize the images or move it, do so in the child. You want to also resize your box collier to match the image in the parent gameobject. Also ensure your starting position X for you ReferencePoint is somewhere off the screen or you will see the platform created and that in your script, the platform script has the transform.position.x < (whatever value you need off the screen). if you followed the videos word for word, you might consider -10 or -15, test this out yourself to see what value works.
Please let me know if this works for you.