I2 Text Animation not working with TextMeshPRO

More
6 years 1 week ago #2845 by wagenheimer
After adding I2_TMPro to my project, I had to move Text Animation folder outside the plugins folder to make it compiles (It does not detect TMPro).

But it still does not work. When I select an animation on a TextMeshPro it fails with :
System.InvalidOperationException: There was an error reflecting type 'I2.TextAnimation.SE_AnimSequence_Position'. ---> System.InvalidOperationException: There was an error reflecting field '_AnimBlend_From'. ---> System.InvalidOperationException: There was an error reflecting type 'I2.TextAnimation.SE_AnimSequence_Position.eAnimBlendMode'. ---> System.InvalidOperationException: Types 'I2.TextAnimation.SE_AnimSequence_Position.eAnimBlendMode' and 'I2.TextAnimation.SE_AnimSequence_Float.eAnimBlendMode' both use the XML type name, 'eAnimBlendMode', from namespace ''. Use XML attributes to specify a unique XML name and/or namespace for the type.
  at System.Xml.Serialization.XmlReflectionImporter.GetTypeMapping (System.String typeName, System.String ns, System.Xml.Serialization.TypeDesc typeDesc, System.Xml.Serialization.NameTable typeLib, System.Type type) [0x00081] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlReflectionImporter.ImportEnumMapping (System.Xml.Serialization.EnumModel model, System.String ns, System.Boolean repeats) [0x00072] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Xml.Serialization.TypeModel model, System.String ns, System.Xml.Serialization.XmlReflectionImporter+ImportContext context, System.String dataType, System.Xml.Serialization.XmlAttributes a, System.Boolean repeats, System.Boolean openModel, System.Xml.Serialization.RecursionLimiter limiter) [0x00162] in <03e950671d964403ab67ff751c460757>:0 
   --- End of inner exception stack trace ---
  at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Xml.Serialization.TypeModel model, System.String ns, System.Xml.Serialization.XmlReflectionImporter+ImportContext context, System.String dataType, System.Xml.Serialization.XmlAttributes a, System.Boolean repeats, System.Boolean openModel, System.Xml.Serialization.RecursionLimiter limiter) [0x00393] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Xml.Serialization.TypeModel model, System.String ns, System.Xml.Serialization.XmlReflectionImporter+ImportContext context, System.String dataType, System.Xml.Serialization.XmlAttributes a, System.Xml.Serialization.RecursionLimiter limiter) [0x00000] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping (System.Xml.Serialization.MemberMapping accessor, System.Xml.Serialization.FieldModel model, System.Xml.Serialization.XmlAttributes a, System.String ns, System.Type choiceIdentifierType, System.Boolean rpc, System.Boolean openModel, System.Xml.Serialization.RecursionLimiter limiter) [0x00fc0] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping (System.Xml.Serialization.StructModel parent, System.Xml.Serialization.FieldModel model, System.Xml.Serialization.XmlAttributes a, System.String ns, System.Xml.Serialization.RecursionLimiter limiter) [0x00083] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers (System.Xml.Serialization.StructMapping mapping, System.Xml.Serialization.StructModel model, System.Boolean openModel, System.String typeName, System.Xml.Serialization.RecursionLimiter limiter) [0x00235] in <03e950671d964403ab67ff751c460757>:0 
   --- End of inner exception stack trace ---
  at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers (System.Xml.Serialization.StructMapping mapping, System.Xml.Serialization.StructModel model, System.Boolean openModel, System.String typeName, System.Xml.Serialization.RecursionLimiter limiter) [0x003b6] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping (System.Xml.Serialization.StructModel model, System.String ns, System.Boolean openModel, System.Xml.Serialization.XmlAttributes a, System.Xml.Serialization.RecursionLimiter limiter) [0x0015b] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Xml.Serialization.TypeModel model, System.String ns, System.Xml.Serialization.XmlReflectionImporter+ImportContext context, System.String dataType, System.Xml.Serialization.XmlAttributes a, System.Boolean repeats, System.Boolean openModel, System.Xml.Serialization.RecursionLimiter limiter) [0x002af] in <03e950671d964403ab67ff751c460757>:0 
   --- End of inner exception stack trace ---
  at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Xml.Serialization.TypeModel model, System.String ns, System.Xml.Serialization.XmlReflectionImporter+ImportContext context, System.String dataType, System.Xml.Serialization.XmlAttributes a, System.Boolean repeats, System.Boolean openModel, System.Xml.Serialization.RecursionLimiter limiter) [0x00393] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping (System.Xml.Serialization.TypeModel model, System.String ns, System.Xml.Serialization.XmlReflectionImporter+ImportContext context, System.String dataType, System.Xml.Serialization.XmlAttributes a, System.Xml.Serialization.RecursionLimiter limiter) [0x00000] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlReflectionImporter.IncludeType (System.Type type, System.Xml.Serialization.RecursionLimiter limiter) [0x00037] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlReflectionImporter.IncludeType (System.Type type) [0x00007] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.String location, System.Security.Policy.Evidence evidence) [0x0002a] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String defaultNamespace, System.String location) [0x00000] in <03e950671d964403ab67ff751c460757>:0 
  at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, System.Type[] extraTypes) [0x00000] in <03e950671d964403ab67ff751c460757>:0 
  at I2.TextAnimation.SE_Animation.LoadFromSerializedData (System.String data) [0x0003c] in D:\Games\Unity\games\Match3\Seven Sails Games\My Downtown\Assets\I2\Text Animation\Scripts\Vertex Effects\Animation\SE_Animation.cs:186 
UnityEngine.Debug:Log(Object)
I2.TextAnimation.SE_Animation:LoadFromSerializedData(String) (at Assets/I2/Text Animation/Scripts/Vertex Effects/Animation/SE_Animation.cs:191)
I2.TextAnimation.SE_AnimationPreset:CreateAnimation() (at Assets/I2/Text Animation/Scripts/Vertex Effects/Animation/SE_AnimationPreset.cs:15)
I2.TextAnimation.SE_AnimationSlot:CreateAnimation() (at Assets/I2/Text Animation/Scripts/Vertex Effects/Animation/SE_AnimationSlot.cs:30)
I2.TextAnimation.SE_AnimationSlot:get__Animation() (at Assets/I2/Text Animation/Scripts/Vertex Effects/Animation/SE_AnimationSlot.cs:22)
I2.TextAnimation.TextAnimation_Inspector:OnGUI_AnimationSlot() (at Assets/I2/Text Animation/Editor/Inspectors/TextAnimation_Inspector_Animations.cs:165)
I2.TextAnimation.TextAnimation_Inspector:OnGUI_Animations() (at Assets/I2/Text Animation/Editor/Inspectors/TextAnimation_Inspector_Animations.cs:73)
I2.TextAnimation.TextAnimation_Inspector:OnInspectorGUI() (at Assets/I2/Text Animation/Editor/Inspectors/TextAnimation_Inspector.cs:70)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Please Log in or Create an account to join the conversation.

More
6 years 1 week ago #2849 by Frank
Hi,
I'm unable to reproduce this issue.
I tried this:
- Downloaded the latest version of I2TextAnimation into a project
- Got the latest TMPro
- Moved the Assets\Plugins\I2 to Assets\I2
- Added I2_TMPro to the Scripting Define Symbols
- Created an scene with a TMPro text and added an animation

That seems to be working fine for me, Am I missing any step?
I noticed that sometimes Unity freaks out a bit when installing TMPro because of the dll switching that it does. Did the problem still happens after restarting the editor?

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The following user(s) said Thank You: wagenheimer

Please Log in or Create an account to join the conversation.

More
6 years 6 days ago #2854 by wagenheimer
I was able to make it work!

I just moved the eAnimBlendMode definition from multiple locations to a single one.
public enum eAnimBlendMode { Offset, Replace }; 

I'm using the Paid Version of TextMeshPRO (instead of the Free), so I don't know if this is the reason that I had to move I2TextAnimation out of plugins folder to make it work.

But after changing the ENUM now is working as expected! Thanks for the GREAT ASSET and support!

Please Log in or Create an account to join the conversation.

Time to create page: 0.137 seconds
Template by JoomlaShine