- Home /
Unity 2d spriteshape setpoint not working in builds
So I have been experimenting with spritehsape and am not able to set points at runtime in builds. It seems to work as expected in Editor . I am able to deform the Object's shape by clicking and dragging the mouse. When I build and run nothing happens in the game. Any help is appreciated.
Code:
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
var spline = GetComponent<SpriteShapeController>().spline;
if(Input.GetMouseButton(0)){
Vector3 pos = Camera.main.ScreenToWorldPoint( Input.mousePosition);
spline.SetPosition(2, pos);
}
}
Here's a link to the video as well https://drive.google.com/open?id=19MAxSJUN5eGMXaLHp63QxZQnWiuWV4mp
2dspriteshapeeditorsnip.jpg
(29.0 kB)
Comment