The following code:
Debug.LogWarning("updating scale fix, scalefactor: "+scaleFactor+" - Current scale is: "+cell.transform.localScale.x);
cell.transform.localScale.Set (scaleFactor,scaleFactor,scaleFactor);
Debug.LogWarning("Scale after fix: " + cell.transform.localScale.x);
It produces the following output:
updating scale fix, scalefactor: 0.9 - Current scale is 0.8921105
UnityEngine.Debug:LogWarning(Object)
Scale after fix: 0.8921105
UnityEngine.Debug:LogWarning(Object)
Any ideas? I would simply suggest that since these things happen immediately after each other, the scale needs to be updated. Or does this happen after the frame is completed?
Any help is appreciated.
source
share