I have a parent object that uses a script which adds several children objects to it. However if I try to modify the parent’s transform.localScale in the script the scale properties of the children are messed and I have no idea why.
Here’s the first scenario that produces correct results:
1.Instantiate the parent object.
2.Change its position.
3.Call a method that creates the children and sets their parent.
4.Get correct results.
However if I modify the parent’s scale like shown below the children’s scale is set to (0,0,0):
1.Instantiate the parent object.
2.Change its position.
3.Change its scale.
4.Call a method that creates the children and sets their parent.
5.All of the children have scale set to (0,0,0).
6.Get incorrect results.
Can someone explain to me what I’m doing wrong?