/// <summary> Finds (or add if needed) the source and Target groups, fits UVs to both the copies from source to Target UVs /// </summary> public void Process( ) { if (SourceObject == null || TargetObject == null) { Debug.Log("Macro error: Both Source and Target gO fields must be filled in. Aborting."); return; } RageGroup sourceGroup = SourceObject.GetComponent <RageGroup>(); RageGroup targetGroup = TargetObject.GetComponent <RageGroup>(); if (sourceGroup == null) { sourceGroup = AddGroups ? SourceObject.AddComponent <RageGroup>() : null; } if (targetGroup == null) { targetGroup = AddGroups ? TargetObject.AddComponent <RageGroup>() : null; } if (sourceGroup == null || targetGroup == null) { Debug.Log("Macro error: One or both groups missing, aborting."); return; } sourceGroup.UvFit(); targetGroup.UvFit(); if (NameCleanup) { sourceGroup.CleanupExtensions(); targetGroup.CleanupExtensions(); } if (PivotoolsBranch) { ApplyPivotoolsBranch(sourceGroup); ApplyPivotoolsBranch(targetGroup); } sourceGroup.UpdatePathList(); targetGroup.UpdatePathList(); OffsetUVs(sourceGroup, targetGroup); if (TempGroups) { SmartDestroy(sourceGroup); SmartDestroy(targetGroup); } }