public static void RageGroupApplyTexturing() { var selectedGameObject = Selection.activeTransform.gameObject; if (!HasSplineAndGroup(selectedGameObject)) { Debug.Log("Macro Error: First select a RageSpline object which has a parent or attached RageGroup"); return; } Vector2 offset = _refSpline.GetTextureOffset(); float angleDeg = _refSpline.GetTextureAngleDeg(); float scaleInv = _refSpline.GetTextureScaleInv(); Vector2 offset2 = _refSpline.GetTextureOffset2(); float angle2Deg = _refSpline.GetTextureAngle2Deg(); float scale2Inv = _refSpline.GetTextureScale2Inv(); foreach (RageGroupElement groupItem in _group.List) { RageSpline thisSpline = groupItem.Spline.Rs; Vector2 offsetDelta = _refSpline.transform.position - thisSpline.transform.position; RageSpline.CopyStyling(ref _refSpline, thisSpline); thisSpline.CopyMaterial(_refSpline); thisSpline.SetTextureOffset(offset + offsetDelta); thisSpline.SetTextureAngleDeg(angleDeg); thisSpline.SetTextureScaleInv(scaleInv); thisSpline.SetTextureOffset2(offset2 + offsetDelta); thisSpline.SetTextureAngle2Deg(angle2Deg); thisSpline.SetTextureScale2Inv(scale2Inv); thisSpline.RefreshMeshInEditor(true, true, true); } Debug.Log("Macro: Texturing applied to all RageGroup members."); }