Esempio n. 1
0
        private static void SetupBuildingFullDumpButton(
            string assetName,
            Mesh mesh,
            Material material,
            Mesh lodMesh,
            Material lodMaterial,
            BuildingInfo.MeshInfo[] subMeshes)
        {
            if (!GUILayout.Button("Full dump"))
            {
                return;
            }

            AssetDumpUtil.DumpBuilding(assetName, mesh, material, lodMesh, lodMaterial, subMeshes);
        }
Esempio n. 2
0
        private static void DumpBuilding(InstanceID instanceId)
        {
            var buildingId = instanceId.Building;

            if (buildingId == 0)
            {
                return;
            }

            var buildingInfo = BuildingManager.instance.m_buildings.m_buffer[buildingId].Info;

            if (buildingInfo != null)
            {
                var assetName = AssetDumpUtil.DumpBuilding(
                    buildingInfo.name,
                    buildingInfo.m_mesh,
                    buildingInfo.m_material,
                    buildingInfo.m_lodMesh,
                    buildingInfo.m_lodMaterial,
                    buildingInfo.m_subMeshes);
                ShowAssetDumpModal(assetName);
            }
        }