Exemplo n.º 1
0
        private static void DumpVehicle(InstanceID instanceId)
        {
            var vehicleId = instanceId.Vehicle;

            VehicleInfo vehicleInfo = null;

            if (vehicleId != 0)
            {
                vehicleInfo = VehicleManager.instance.m_vehicles.m_buffer[vehicleId].Info;
            }
            else
            {
                vehicleId = instanceId.ParkedVehicle;
                if (vehicleId != 0)
                {
                    vehicleInfo = VehicleManager.instance.m_parkedVehicles.m_buffer[vehicleId].Info;
                }
            }

            if (vehicleInfo != null)
            {
                var assetName = AssetDumpUtil.DumpVehicle(
                    vehicleInfo.name,
                    vehicleInfo.m_mesh,
                    vehicleInfo.m_material,
                    vehicleInfo.m_lodMesh,
                    vehicleInfo.m_lodMaterial,
                    vehicleInfo.m_subMeshes);
                ShowAssetDumpModal(assetName);
            }
        }
Exemplo n.º 2
0
        private static void SetupVehicleFullDumpButton(
            string assetName,
            Mesh mesh,
            Material material,
            Mesh lodMesh,
            Material lodMaterial,
            VehicleInfo.MeshInfo[] subMeshes)
        {
            if (!GUILayout.Button("Full dump"))
            {
                return;
            }

            AssetDumpUtil.DumpVehicle(assetName, mesh, material, lodMesh, lodMaterial, subMeshes);
        }