Hi! We have problem with scaling barriers to some rectangular area. We want to move it with rect. area, so want to attach prefab to them. We doing this:
tmp_right.transform.localScale *= catcher.obj.transform.localScale.y;
tmp_left.transform.localScale *= catcher.obj.transform.localScale.y;
tmp_right.transform.parent = catcher.obj.transform;
tmp_left.transform.parent = catcher.obj.transform;
Debug.Log(tmp_right.transform.localScale);
Debug.Log(tmp_right.transform.localScale);
When we do multiplication it’s all okay. But after assigning parent - localScale of tmp’s stuff is (0, 0, 0). And we just don’t see anything on screen.