Hi,
I have tried to change the target of all the anchorpoints of a sprite in code which happens on click.
objSpr.leftAnchor.target = firstEmptyCase.transform;
objSpr.rightAnchor.target = firstEmptyCase.transform;
objSpr.topAnchor.target = firstEmptyCase.transform;
objSpr.bottomAnchor.target = firstEmptyCase.transform;
I believe this is the right way to do this as when running, in the inspector, i see the target change. but in fact, in the scene, it doesn't change. If i manually change the target to anything else and back to the right transform, it works.
I don't see why it behaves that way.
If you need any more details or if i'm not clear enough, ask
