Just write a script that iterates over the material's texture properties and updates their tiling and scaling to match a master value.
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class MaterialScaler : MonoBehaviour
{
#if UNITY_EDITOR
public Vector2 tiling = new Vector2(1, 1);
public Vector2 offset = new Vector2(0, 0);
private void OnValidate() {
var properties = new List<int>();
foreach(var material in GetComponent<Renderer>().sharedMaterials) {
material.GetTexturePropertyNameIDs(properties);
EditorUtility.SetDirty(material);
Undo.RecordObject(material, "Change Shared Tiling/Offset");
foreach(var id in properties) {
material.SetTextureScale(id, tiling);
material.SetTextureOffset(id, offset);
}
}
AssetDatabase.SaveAssets();
}
#endif
}
If you really want to pretend this is part of the responsibilities of the GameObject class itself, you could always write it as an extension method:
public static class GameObjectExtensions {
public static void TransformAllTextures(this GameObject gameObject, Vector2 tiling, Vector2 offset) {
var properties = new List<int>();
foreach(var material in gameObject.GetComponent<Renderer>().sharedMaterials) {
material.GetTexturePropertyNameIDs(properties);
foreach(var id in properties) {
material.SetTextureScale(id, tiling);
material.SetTextureOffset(id, offset);
}
}
}
}
You can now call this with:
someGameObject.TransformAllTextures(tiling, offset);