Search Unity

"Standard" VS update from 7.7.2 to 7.7.3 Build 43 and get problems

Discussion in 'Editor & General Support' started by pKallv, Jan 20, 2019.

  1. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    I accepted a suggested in VS Visual Studio update and now have 7.7.3 Build:43

    I am developing a card game using UI Image objects. I have the following script to drag an object:

    Code (CSharp):
    1. public void OnDrag(PointerEventData eventData) {
    2.  
    3.         if (!_engine.isObjectsEnabled)
    4.             return;
    5.  
    6.         // Check if card is clicked at Ace Zone, if so stop all further actions
    7.         if (fromZone == 10 || fromZone == 20 || fromZone == 30 || fromZone == 40) {
    8.             return;
    9.         }
    10.  
    11.         // If this is a card with back up, do not drag, if not perform drag
    12.         if (myRectTransform.name.Substring(myRectTransform.name.Length - 1, 1) != "B") {
    13.             myRectTransform.anchoredPosition += new Vector2(eventData.delta.x, eventData.delta.y);
    14.         }
    15.     }
    This have worked flawless prior to this update and now the Image/card is falling behind the mouse when I drag. I did restore old copies (collaboration) of my code and I get the same problem with old versions of the game that did work.

    I am sure that the only change done was the VS update. I now have updated Unity3d, including VS, to latest version and still have the same problem. ...including with versions of my game that I know worked flawless.

    I am now on Unity v.3.2.f1 and VS 7.7.3 Build 43.

    I do get:

    Skärmavbild 2019-01-20 kl. 10.50.42.png

    I guess the only thing I could think about is to downgrade VS, if I am able to do so,. or do a complete reinstall of Unity.

    Anyone having any ideas or tips?
     
  2. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    Have been testing on other machines, reinstalled etc. and I still have this problem. I guess VS is not impacting this but I cannot figure out the reason, especially as I now have it on old versions of the code as well.
     
  3. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    Well I have now solved the problem with code. I changed:

    Code (CSharp):
    1. myRectTransform.anchoredPosition += new Vector2(eventData.delta.x, eventData.delta.y);
    to:

    Code (CSharp):
    1. this.transform.position += (Vector3)eventData.delta;
    This solved the problem but I can still not understand why the old code did work from basically day#1, approx. four month ago, until yesterday???