Blocks randomly become transparent

I’m following the tutorial and enjoying so far. Encountered a problem - suddenly my bricks started to randomly become transparent. I do not know exactly what was the reason. I think it started when I added the blocks as prefabs.
See this video:

Has anyone had such a problem? How to solve it?

Using Unity 5.4.3 on two machines, syncying the code with GIT. Tried to check out the earliest version where I added the bricks, the problem is still there. So I guess there was no moment when I broke the bricks, they just are wrong from the beginning.

The project can be downloaded here:

Yes, I have had that problem just not to the same degree it was only on certain colour of blocks that were on the wrong Z-axis and I’ve also had the same thing happen when I had a transform.translation for forward (instead of up, facepalm) which also affected the Z axis - moving into the screen.

But, I don’t think you’ve done that so I can’t imagine what’s going on.

I will have some free-time tomorrow so I will take a quick look at your code.

Regards,
Vaughan.

2 Likes

Thanks, Vaughan, you helped to solve the problem. It was related to z-index. I had different z index for the empty objects holding the hierarchy.

Thanks for the pointer!

Girts

1 Like

I’m glad I could help :grinning:.

1 Like

I’m having the same issue, this says solved,but I don’t see a solution! Please help!

I moved my background to temporarily deal with issue.

Posts 2 and 3… regarding the z-index. :slight_smile:

1 Like

Check z-index for the bricks and all the objects in the hierarchy. E.g., I have the following hierarchy: (see attached image)

I set Position.Z to 0 for PlaySpace, 15 for Background image, and to 0 for all objects under Bricks.
In that way we ensure that the Background image is behind all the bricks (further away from the camera view).


1 Like

Thank you so much, the pic helped!!!

1 Like

Privacy & Terms