Skip to content

Commit

Permalink
Merge pull request #850 from gpvigano/fix/copy_highlighter_parent
Browse files Browse the repository at this point in the history
fix(Interaction): parent of the outline highlighter cloned object
  • Loading branch information
thestonefox committed Jan 20, 2017
2 parents ecc30ef + af45d44 commit 6cc5674
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -145,10 +145,10 @@ private void CreateHighlightModel()
}

highlightModel = new GameObject(name + "_HighlightModel");
highlightModel.transform.SetParent(transform);
highlightModel.transform.position = copyModel.transform.position;
highlightModel.transform.rotation = copyModel.transform.rotation;
highlightModel.transform.localScale = Vector3.one;
highlightModel.transform.SetParent(copyModel.transform.parent, false);
highlightModel.transform.localPosition = copyModel.transform.localPosition;
highlightModel.transform.localRotation = copyModel.transform.localRotation;
highlightModel.transform.localScale = copyModel.transform.localScale;

foreach (var component in copyModel.GetComponents<Component>())
{
Expand Down

0 comments on commit 6cc5674

Please sign in to comment.