Unity Animation Hierarchy Editor

When i was working with unity 2D character animations, I have created hierarchy style rigs and done many animations. But later i had a situation to change the order of hierarchy and also renaming some nodes. After doing these changes i noticed that all animations were broken.

After some research i understood that animation curves stores data based on naming. So the solution is i have to replace paths for all animation curves in all animations.  INSANE

Unfortunately there is no option to set new path for animation curves. So i have started replacing paths manually for few animations using word pad search and replace. Got tired and back to unity and looked into scripts and found a way to replace using code. And made this tool.

 

If you are in same situation then download this compiled plugin and save your soul 🙂

Works with unity 5 and above. Please comment below for any issues or suggestions.

Plase note:

  1. All rotational curves should be save in Quaternion format. Other wise it will create keys on every frame.
  2. Take backup of your work before editing with this tool.
  3. This is not a professionally tested tool, So use it with your own risk.

 

AnimationHierarchyEditor.rar

 

 

Unity Text Rendering Issue

Recently I have planned for a Telugu word game in unity and i have noticed that Unity text rendering system doesn’t work for some languages(Hindi, Telugu, Tamil etc..). The text looks broken, wrong order of alphabets and missing shapes etc...

Look into below image for better understanding.

 BrokenCorrect

This happens because unity doesn't read/apply glyph positions (GPOS) and glyph substitutes (GSUB) from font file.

GPOS and GSUB tables information is necessary for these languages to render text properly.

I have searched for a solution, but i couldn't find anything, So i thought to solve myself and tried some ideas.

Idea 1:

  1. Create a native plugin to read GPOS and GSUB tables from font files.
  2. Create a custom Text component  and uni scribe text as per language rules
  3. Apply GPOS and GSUB information and generate text mesh .

 

Pros: I can use downloaded TTF fonts, No need to create font asset.

Cons: Creating a native plugin is platform dependent.  I have to write for all platforms.

Idea 2:

  1. Create a custom font asset inside unity.
  2. Design font from scratch using sprites and store alphabet information in font asset.
  3. Create a custom Text component  and uni scribe text as per language rules.
  4. Read alphabets information from custom font asset and generate text mesh.

 

This idea is platform independent, But have to design font asset.

I followed the Idea no 2 and prepared flow charts

Click on the image to see full size.

IndicFontAsset

IndicTextComponent

 

 

Download Sample Telugu and Tamil Font:

IndicText

Here is the output.

"https://youtu.be/KnTtBFrI3d0"

 

 

There might be a better and easy solution for this issue, but for now this is the only idea i have. So i am using this for my upcoming game.