using System; using System.Collections.Generic; using UnityEngine; public class _MOL : MonoBehaviour { public static void SetMolding() { List> objectList = DOLIST.OBJTAGLIST("cabwall"); List> objectList_WallOnly = DOLIST.OBJTAGLIST_WALLONLY("cabwall"); // Chaque etape est isolee : ConstructFASCIA passe en premier, une exception dedans // emportait l'ogee, le valance ET l'appelant (AI.AiProcess -> plus de PDF ni de sauvegarde). // On log l'etape fautive au lieu de perdre tout le pipeline. Step("FASCIA", () => ConstructFASCIA.Head(objectList)); Step("OGEE", () => ConstructOGEE.OGEE(objectList)); Step("VALANCE", () => ConstructVALANCE.Under(objectList_WallOnly)); Step("PRICE", PRICE.Calprice); } static void Step(string name, Action action) { try { action(); } catch (Exception e) { Debug.LogError("[SetMolding] etape " + name + " en echec : " + e); } } }