Hello Guest

Author Topic: Layout prefabs in UI_demo are missing a mono script?  (Read 4474 times)

Velvety

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Velvety Couch Games
Layout prefabs in UI_demo are missing a mono script?
« 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

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Layout prefabs in UI_demo are missing a mono script?
« Reply #1 on: October 03, 2013, 09:52:54 am »
What version of Unity / 2D Toolkit?
When you run the integrity checker, is everything good?

Velvety

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Velvety Couch Games
Re: Layout prefabs in UI_demo are missing a mono script?
« Reply #2 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?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Layout prefabs in UI_demo are missing a mono script?
« Reply #3 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...

Velvety

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Velvety Couch Games
Re: Layout prefabs in UI_demo are missing a mono script?
« Reply #4 on: October 03, 2013, 06:30:25 pm »
Thank you, that worked! :)