21
Releases / Re: 2D Toolkit 2.5.8.16
« Last post by birdkingz on September 23, 2019, 08:15:15 am »Thanks for the fix!
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)
"
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;
}
Any chance of supporting Unity 2018.4? I asked about that in another thread, and you mentioned that you would support up to Unity 2018.4, just double-checking!
2018.4 is important because it's the LTS (Long Term Support) release, and Unity will be properly supporting it with bug fixes, etc. for nearly two more years, which will give a lot of time to move over to the built-in Unity 2D.
Looking at how Unity 2017.4 has been handled for the last few years, there weren't any major changes, just bug fixes, support for necessary things like 64-bit on Android, etc. (none of which would affect 2D Toolkit, probably).
Yes please! Happy to fix up if I can get a repro
support at unikronsoftware.com
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)
"
Ran into my first issue.
My project was previously Unity 2017.4.32f1, and I updated it to Unity 2018.4.8f1 and 2D Toolkit v2.5.8.16.
If I edit a prefab that was originally created in Unity 2017, and I modify any tk2d component in the prefab, the changes are not saved in the prefab.
If I modify any non-tk2d component in the prefab after making some changes to tk2d components in the prefab, the tk2d components will be correctly saved/updated in the prefab. So the changes are being recognized, they just aren't triggering a save of the prefab.
If I remove a tk2d component, and add the same component back in (as a new component), it has the same behavior (so I don't think it's necessarily due to the update from Unity 2017 to 2018?).
So far this seems to only be an issue with the tk2d UI components, not the regular components (example: tk2dBaseSprite is fine, but tk2dUIUpDownButton has the bug). Possibly it's only components that have tk2dUIBaseItemControlEditor.cs as a base class?
Only test project I can provide would be a complete copy of my entire game, which I'm willing to do if that would help, just let me know!