Author Topic: Add an option to set targets with a transform list  (Read 76 times)

Christian Petry

  • Guest
Add an option to set targets with a transform list
« on: March 30, 2020, 12:52:45 AM »
Hello,

first of all: This is a great asset! I really like using this.

Still I had to adjust it to my very specific needs. I need to set specific transforms as targets.
This is my little addition:

Code
public void SetTargets(List<Transform> transforms)
{
     transforms = transforms.Where(x => x.gameObject.activeInHierarchy).ToList();

     if (transforms.All(targets.Contains) && transforms.Count == targets.Count)
         return;

     if (_highlighted)
         SetHighlighted(false);
   
     targets = transforms;
     SetupMaterial();
}

I would rather not touch 3rd party plugins. This prevents me from updating.
Can you add something similar?

Best regards
Christian Petry