2D Toolkit Forum

2D Toolkit => Support => Topic started by: Velvety on October 02, 2013, 08:08:55 pm

Title: Layout prefabs in UI_demo are missing a mono script?
Post by: Velvety on October 02, 2013, 08:08:55 pm
I have v2.2 and I'm going through the UI tutorial for the first time trying to use BasicButtons with a layout.

When I drag the BasicButton prefab (or any layout prefab it seems) from TK2DROOT/tk2dUIdemo/ControlPrefabs/Layout into my scene it has a missing mono script on it.  Also the parent Tk2dUILayoutContainerSizer does not recognize it (this is probably related).

What is the missing Tk2d script that needs to be attached to the layout button?

Thanks
Title: Re: Layout prefabs in UI_demo are missing a mono script?
Post by: unikronsoftware on October 03, 2013, 09:52:54 am
What version of Unity / 2D Toolkit?
When you run the integrity checker, is everything good?
Title: Re: Layout prefabs in UI_demo are missing a mono script?
Post by: Velvety on October 03, 2013, 04:12:40 pm
I'm using Unity 4.2.1f4 and 2DToolkit v2.2.

The Integrity check turned up a few errors:

 File GUID does not match: Assets/TK2DROOT/tk2d/Code/Runtime/tk2dUpdateManager.cs
 File GUID does not match: Assets/TK2DROOT/tk2d/Code/Core/tk2dUICamerca.cs
 File GUID does not match: Assets/TK2DROOT/tk2d/Code/Core/tk2dUILayout.cs
 File GUID does not match: Assets/TK2DROOT/tk2d/Code/Core/tk2dUILayoutContainer.cs
 File GUID does not match: Assets/TK2DROOT/tk2d/Code/Core/tk2dUILayoutCotainerSizer.cs

I guess that means something went wrong with an update or something?  What's the best way for me to resolve this without losing all my current configured sprite collections?
Title: Re: Layout prefabs in UI_demo are missing a mono script?
Post by: unikronsoftware on October 03, 2013, 05:54:08 pm
Easiest way to do it is to delete those files, restart Unity, and then reimport 2.2.
It should then work...
Title: Re: Layout prefabs in UI_demo are missing a mono script?
Post by: Velvety on October 03, 2013, 06:30:25 pm
Thank you, that worked! :)