2D Toolkit Forum

2D Toolkit => Releases => Topic started by: unikronsoftware on April 29, 2019, 10:54:38 pm

Title: 2D Toolkit 2.5.8.16
Post by: unikronsoftware on April 29, 2019, 10:54:38 pm
Unity 2018.4.9 highly recommended for this release
After a long series of tests, happy enough for general release. There may be non-showstopping bugs in this, there are a few refresh bugs that I am aware of.

If you are having prefab not saving issues - update to Unity 2018.4.9 (LTS) - it fixes some issues.

Fixed issues

Known issues

Title: Re: 2D Toolkit 2.5.8.16
Post by: Kirb on May 06, 2019, 09:33:42 am
Awesome; thanks a ton for the official release!
Title: Re: 2D Toolkit 2.5.8.16
Post by: nachobeard on July 19, 2019, 09:49:27 pm
thank you for the release, a lot of us really need it and appreciate it
Title: Re: 2D Toolkit 2.5.8.16
Post by: wagenheimer on September 05, 2019, 06:02:11 pm
Is there an update to work on 2019.3?

"tk2dCamera.GetGameViewSize - has a Unity update broken this?
This is not a fatal error, but a warning that you've probably not got the latest 2D Toolkit update.

System.NullReferenceException: Object reference not set to an instance of an object
  at tk2dCamera.Editor__GetGameViewSize (System.Single& width, System.Single& height, System.Single& aspect) [0x00021] in D:\Games\Green Sauce Games\Tales of the Orient - The Rising Sun\Assets\TK2DROOT\tk2d\Code\Camera\tk2dCamera.cs:371
UnityEngine.Debug:LogError(Object)
tk2dCamera:Editor__GetGameViewSize(Single&, Single&, Single&) (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:430)
tk2dCamera:GetScreenPixelDimensions(tk2dCamera) (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:709)
tk2dCamera:UpdateCameraMatrix() (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:782)
tk2dCamera:OnEnable() (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:275)
"
Title: Re: 2D Toolkit 2.5.8.16
Post by: unikronsoftware on September 16, 2019, 12:45:33 pm
Is there an update to work on 2019.3?

"tk2dCamera.GetGameViewSize - has a Unity update broken this?
This is not a fatal error, but a warning that you've probably not got the latest 2D Toolkit update.

System.NullReferenceException: Object reference not set to an instance of an object
  at tk2dCamera.Editor__GetGameViewSize (System.Single& width, System.Single& height, System.Single& aspect) [0x00021] in D:\Games\Green Sauce Games\Tales of the Orient - The Rising Sun\Assets\TK2DROOT\tk2d\Code\Camera\tk2dCamera.cs:371
UnityEngine.Debug:LogError(Object)
tk2dCamera:Editor__GetGameViewSize(Single&, Single&, Single&) (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:430)
tk2dCamera:GetScreenPixelDimensions(tk2dCamera) (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:709)
tk2dCamera:UpdateCameraMatrix() (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:782)
tk2dCamera:OnEnable() (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:275)
"

Hi there,

I have made an announcement today that the last version of Unity we'll be supporting is 2018.3. Its become impossible to keep up with Unity unfortunately.
Title: Re: 2D Toolkit 2.5.8.16
Post by: baconbanditgames on September 16, 2019, 07:15:23 pm
Is there an update to work on 2019.3?

"tk2dCamera.GetGameViewSize - has a Unity update broken this?
This is not a fatal error, but a warning that you've probably not got the latest 2D Toolkit update.

System.NullReferenceException: Object reference not set to an instance of an object
  at tk2dCamera.Editor__GetGameViewSize (System.Single& width, System.Single& height, System.Single& aspect) [0x00021] in D:\Games\Green Sauce Games\Tales of the Orient - The Rising Sun\Assets\TK2DROOT\tk2d\Code\Camera\tk2dCamera.cs:371
UnityEngine.Debug:LogError(Object)
tk2dCamera:Editor__GetGameViewSize(Single&, Single&, Single&) (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:430)
tk2dCamera:GetScreenPixelDimensions(tk2dCamera) (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:709)
tk2dCamera:UpdateCameraMatrix() (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:782)
tk2dCamera:OnEnable() (at Assets/TK2DROOT/tk2d/Code/Camera/tk2dCamera.cs:275)
"

I haven't tested this extensively, but a quick workaround is to update the Editor__GetGameViewSize function with this:

Code: [Select]
public static bool Editor__GetGameViewSize(out float width, out float height, out float aspect) {
width = Screen.width;
height = Screen.height;
aspect = (float)width / (float)height;
return true;
}

This will not work if you select "Free Aspect" - you must select an explicit resolution in the editor.

It does seem to work with any chosen, explicit resolution. I have not checked to see if this has any negative effects, use at your own risk!

Also worth noting that it may not work with how you have your tk2d camera(s) set up!

Note that this error happens in Unity 2019.3+ because Unity removed UnityEditor.GameView.GetMainGameView. As Unity 2019.3 is still in beta, most plugin authors likely haven't looked into this issue. I'm thinking we'll see a more formal solution from the community and/or other plugin authors after 2019.3 is officially released, at which point a proper solution can hopefully be implemented.
Title: Re: 2D Toolkit 2.5.8.16
Post by: birdkingz on September 23, 2019, 08:15:15 am
Thanks for the fix!
Title: Re: 2D Toolkit 2.5.8.16
Post by: zblack on November 15, 2019, 08:26:47 pm
May have found a bug in tk2dUITextInput Start():

Code: [Select]
if (tk2dUIManager.Instance__NoCreate != null) //__BUG__ if tk2dUIManager doesn't exist yet, AnyPress doesn't get added!
{
tk2dUIManager.Instance.OnAnyPress += AnyPress;
}
wasOnAnyPressEventAttached = true;

Curious why this is using Instance__NoCreate instead of just instantiating it?
Title: Re: 2D Toolkit 2.5.8.16
Post by: unikronsoftware on November 26, 2019, 06:08:39 pm
Its because you can have the UI separate to the instance (its usually in a scene). So it should be created by then, or if it isn't it hasn't loaded yet.