Hello Guest

Author Topic: Issues with Unity 2018  (Read 107278 times)

coshea

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 33
    • View Profile
Issues with Unity 2018
« on: June 04, 2018, 02:56:56 pm »
Upgraded from 2017 > 2018 using TK2D 2.5.8.9

This is the error (editor console, not playback)

NullReferenceException: Object reference not set to an instance of an object
tk2dSpriteAttachPoint.HandleSpriteChanged (.tk2dBaseSprite spr) (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSpriteAttachPoint.cs:77)
tk2dSpriteAttachPoint.Awake () (at Assets/TK2DROOT/tk2d/Code/Sprites/tk2dSpriteAttachPoint.cs:35)

Thanks




unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Issues with Unity 2018
« Reply #1 on: June 18, 2018, 10:06:06 pm »
I will investigate this.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Issues with Unity 2018
« Reply #2 on: July 09, 2018, 09:56:20 pm »
Hi there,

Apologies for the late reply, I have not seen this issue at all.
Can you try to create a repro case for this?

ultdev

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Issues with Unity 2018
« Reply #3 on: July 12, 2018, 09:29:02 pm »
There is another issue with 2018.2. Specifically, trying to set up textures to be sprite sheets in the sprite collection doesn't work. I have to manually set them to be compatible in the unity inspector.

Kirb

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Issues with Unity 2018
« Reply #4 on: December 14, 2018, 09:39:17 pm »
@ultdev

Was this resolved/confirmed? Our project is still on 2018.1 and want to update; but we deal with so many spritesheets that the idea of having to manually set up sprites is a bit frightening.

giacomopc

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Issues with Unity 2018
« Reply #5 on: December 17, 2018, 05:40:21 pm »
I updated my project to 2018.3 and using the Commit button on the animation editor doesn't work. It seems to be a change that affects any prefab you try to edit using 2D Toolkit's windows.

Steps to reproduce:
1. Create a new project on Unity 2018.3.0
2. Create a Sprite Animation asset on the Project tab.
3. Open the Prefab
4. Click the Open Editor... button on the created SpriteAnimation
5. Create a new clip, then click "Commit", and deselect the prefab, then select it again.
6. Close the Popup Window, and open it again. You'll see that it didn't save your changes.

csumsky3

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 14
    • View Profile
    • www.moonlightkids.co
Re: Issues with Unity 2018
« Reply #6 on: December 17, 2018, 10:04:09 pm »
Hello,

Getting issues with 2018.3 also. We just updated, and the main issue is that you can no longer commit new sprites to Sprite Collections. You just get the following error:

Code: [Select]
ArgumentException: Invalid path
System.IO.Path.GetDirectoryName (System.String path) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
tk2dEditor.SpriteCollectionBuilder.LinkBuilder.Build (tk2dSpriteCollection data) (at Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteCollectionLinkBuilder.cs:39)

I'll post the full console to the end of this message. Any solutions here? Pretty major since we effectively can't add new sprites to our project as of 2018.3.

As a smaller issue, there are also a ton of new warnings that print to console every time the project compiles. Not breaking anything (maybe...), but makes it hard to use the console very effectively.

Thanks for any help! Hoping we don't have to revert Unity versions :/

Here's the full console log for the main sprite collection error:

Code: [Select]
ArgumentException: Invalid path
System.IO.Path.GetDirectoryName (System.String path) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
tk2dEditor.SpriteCollectionBuilder.LinkBuilder.Build (tk2dSpriteCollection data) (at Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteCollectionLinkBuilder.cs:39)
tk2dSpriteCollectionBuilder.Rebuild (tk2dSpriteCollection gen) (at Assets/TK2DROOT/tk2d/Editor/Sprites/tk2dSpriteCollectionBuilder.cs:1454)
tk2dSpriteCollectionEditorPopup.Commit () (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteCollectionEditor/tk2dSpriteCollectionEditorPopup.cs:446)
tk2dSpriteCollectionEditorPopup.DrawToolbar () (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteCollectionEditor/tk2dSpriteCollectionEditorPopup.cs:436)
tk2dSpriteCollectionEditorPopup.OnGUI () (at Assets/TK2DROOT/tk2d/Editor/Sprites/SpriteCollectionEditor/tk2dSpriteCollectionEditorPopup.cs:907)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:363)
UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:322)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401)
UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:511)
UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr

denysus

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Issues with Unity 2018
« Reply #7 on: December 21, 2018, 03:27:51 am »
Yes, it seems that new Nested Prefab system broken the saving ability. Unable to commit collections anymore (2018.3)

Ninja

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Issues with Unity 2018
« Reply #8 on: January 01, 2019, 04:38:32 am »
Same issues as csumsky3, just upgraded to Unity 2018.3. Any progress on a solution?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Issues with Unity 2018
« Reply #9 on: January 06, 2019, 05:02:24 pm »
Still investigating a solution. The new prefab system has busted it.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Issues with Unity 2018
« Reply #10 on: January 08, 2019, 11:37:02 pm »
This is not looking great - its changed quite substantially and I'm running out of hacks that I can think of to work around this. Will keep plodding at this.

Kirb

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Issues with Unity 2018
« Reply #11 on: January 10, 2019, 02:11:51 am »
Thanks for the update; it's lucky that our team hadn't updated the project to 2018.3 yet, although we'll need to update to 2019.1+ soon. Hope you're able to find a solution.
« Last Edit: January 10, 2019, 05:46:38 am by Kirb »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Issues with Unity 2018
« Reply #12 on: January 10, 2019, 10:45:34 pm »
I think I have a solution to this. It will need a manual project upgrade after switching to 2018, but it should be a one off, and it should automatically upgrade everything. There may be caveats with assetbundles but otherwise should work as a one way upgrade step. That way I can support what is there, but deprecate it and provide a migration for users.

Also it would be unrealistic to support any version prior to 2018 in this update (quite possibly, but still unsure) as the changes will be so far reaching.

Thoughts?
« Last Edit: January 10, 2019, 10:48:28 pm by unikronsoftware »

csumsky3

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 14
    • View Profile
    • www.moonlightkids.co
Re: Issues with Unity 2018
« Reply #13 on: January 10, 2019, 11:11:16 pm »
By "manual project upgrade" do you mean manually importing some new version of tk2d that you'd pass along?

But yea in general this solution sounds reasonable to me. We're pretty desperate for a solution and can't go backwards in unity versions so I'm pretty open to any ideas that work! Haha. Thanks for the work on this so far.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Issues with Unity 2018
« Reply #14 on: January 11, 2019, 12:01:08 am »
By manual project upgrade I mean
1. Updating tk2d
2. Starting Unity and running a menu entry to upgrade (it will still work, but you wont be able to edit your collections until you upgrade)
3. Modify your code (potentially?) if you use some parts of the system (eg. if you use tk2dSpriteCollectionData directly, the class ref needs to be changed to tk2dSpriteCollectionDataV2).

I assume its less likely that people direclty access these data classes... the functions are EXACTLY the same, and none of the runtime classes should be affected, eg. tk2dSprite and friends are all exaclty the same.

I have V2 working, just need to sort the migration next, but will need volunteers to help test (BACKUP YOUR PROJECT PLEASE!)