Im trying to get all materials from a prefab but it always returns 0 materials. A prefabs should return all assigned materials.
Only the M923A1 returns a single material. Not sure why.
I tried a couple different methods but all fail to return all materials:
ResourceName modelPath; string remap; SCR_Global.GetModelAndRemapFromResource("{3F2AA823B6C65E1E}Prefabs/Vehicles/Wheeled/M923A1/M923A1_transport_MERDC.et", modelPath, remap); Print(modelPath); Print(remap); -> ResourceName modelPath = '{DF7CF60669EFC7E5}Assets/Vehicles/Wheeled/M923A1/M923A1_BASE.xob' string remap = '$remap 'M923A1_Base' '{7463EDCC42A45CFB}Assets/Vehicles/Wheeled/M923A1/Data/M923A1_Base_MERDC.emat';' ---- IEntityComponentSource itemComponentSource = SCR_BaseContainerTools.FindComponentSource(Resource.Load("{3F2AA823B6C65E1E}Prefabs/Vehicles/Wheeled/M923A1/M923A1_transport_MERDC.et"), MeshObject); BaseContainerList meshMaterials = itemComponentSource.GetObjectArray("Materials"); PrintFormat("Mesh has %1 materials", meshMaterials.Count()); -> Mesh has 1 materials