Forum rules - please read before posting.

Sprite unity complex character with tint maps

edited September 2022 in Technical Q&A

I converted my character from sprite unity to complex. I noticed that even if I add the "follow tint map" component to the main character object (or its immediate children), it doesn't work, but if I do it on a deep level sprite (an arm, a leg..) it does. Is there a less painful way to do it than adding the component to every single sprite inside the character? There's probably around a hundred of them

Comments

  • edited September 2022

    It should just be a case of attaching to the root or sprite child and checking Affect children too? in its Inspector. Is this not having an effect, even on "deep level" sprites that are affected when attached to directly?

    Can you share details of your character's Hierarchy? How far down the Hierarchy are sprites placed, and what are your AC/Unity versions?

  • Thanks for the answer. I tried again "affect children", and I noticed it works... partially. Because of the complexity of the hierarchy, the character is split in 6 different body rigs (1 per direction) + 6 heads, that the engine switches on/off with animations depending on the direction. While in edit mode, for sake of simplicity I always keep all rigs switched off except the one I'm working on.

    I just noticed that the tint map works only on the rig that was switched on at the moment the game started, and not the others. eg: I was working on some UR-facing animation, so in edit mode only the UR facing rig was on. When playing, the only sprites affected by the tint map are the ones under the UR facing rig.

    This wouldn't be a problem if it was a matter of switching on all 6 rigs before compiling, but I have several other switched off sprites in the rigs, used in specific animations (. These sprites won't be affected by the tint map as well

    I'm with unity 2021.2.14 and AC 1.75.0

    Here's an example of my hierarchy (I took your advice from this thread and it's working great for me)

  • Open up AC's FollowTintMap script and replace line 62:

    _spriteRenderers = GetComponentsInChildren <SpriteRenderer>();
    

    with:

    _spriteRenderers = GetComponentsInChildren <SpriteRenderer>(true);
    

    Does that resolve it?

  • it works! thank you very much

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.