Name: Anonymous 2012-10-09 14:34
Pretty much any language other than C#:
C#:
Suggested C# workaround:
10/10 would bang
gun.transform.localPosition.x = newPos;C#:
gun.transform.localPosition.x = newPos;
error CS1612: Cannot modify a value type return value of `UnityEngine.Transform.localPosition'. Consider storing the value in a temporary variableSuggested C# workaround:
gun.transform.localPosition.x = new Vector3(newPos, gun.transform.localPosition.y, gun.transform.localPosition.z);10/10 would bang