1
Support / Animation resetting material?
« on: December 30, 2014, 05:08:24 pm »
I need to have multiple materials to support some custom shaders but it seems running an animation resets the material. Any way to avoid that?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
[MenuItem("Blah/Mass Rename/Idle Sprites")]
public static void MassRenameIdleSprites()
{
try
{
var spriteCollection = AssetDatabase.LoadAssetAtPath("Assets/Sprites/MainSpriteCollection.prefab", typeof(tk2dSpriteCollection)) as tk2dSpriteCollection;
var spriteCollectionData = spriteCollection.spriteCollection;
for (int i = 0; i < spriteCollectionData.Count; i++)
{
spriteCollectionData.spriteDefinitions[i].name = spriteCollectionData.spriteDefinitions[i].name + "AB";
}
}
catch (Exception e)
{
Debug.LogException(e);
}
}