2D Toolkit Forum

2D Toolkit => Support => Topic started by: TinSleeves on July 11, 2013, 05:04:42 pm

Title: Animation Issue after upgrade to 2.0
Post by: TinSleeves on July 11, 2013, 05:04:42 pm
I just updated to 2.0 I get one error (pretty good going)

Basically in my game the player can mutate into different characters so I was just switching out my animated sprite using the following code
Code: [Select]
playerSprite.anim = (tk2dSpriteAnimation)Resources.Load ("player2Anim", typeof(tk2dSpriteAnimation));


but now i get the following error
Quote
Assets/Scripts/playerNEW.cs(194,30): error CS0122: `tk2dAnimatedSprite.anim' is inaccessible due to its protection level

Is there a way round this?
Title: Re: Animation Issue after upgrade to 2.0
Post by: unikronsoftware on July 11, 2013, 05:14:32 pm
Thats covered in the migration guide:
http://unikronsoftware.com/2dtoolkit/doc/2.00/migration_guide.html

.anim is now .Library
Title: Re: Animation Issue after upgrade to 2.0
Post by: TinSleeves on July 11, 2013, 05:30:43 pm
Awesome thanks, I missed that