static bool Prefix(string _path, SceneInfo __instance, ref bool __result) { LightsSerializationData.Save(_path + "_lights.extdata"); Profile.Save(_path + ".extdata"); using (FileStream fileStream = new FileStream(_path, FileMode.Create, FileAccess.Write)) { using (BinaryWriter binaryWriter = new BinaryWriter(fileStream)) { byte[] buffer = __instance.CreatePngScreen(320, 180); binaryWriter.Write(buffer); binaryWriter.Write(__instance.version.ToString()); __instance.Save(binaryWriter, __instance.dicObject); binaryWriter.Write(__instance.map); __instance.caMap.Save(binaryWriter); binaryWriter.Write(__instance.atmosphere); binaryWriter.Write(__instance.enableSSAO); binaryWriter.Write(__instance.ssaoIntensity); binaryWriter.Write(__instance.ssaoRadius); binaryWriter.Write(JsonUtility.ToJson(__instance.ssaoColor)); binaryWriter.Write(__instance.enableBloom); binaryWriter.Write(__instance.bloomIntensity); binaryWriter.Write(__instance.bloomDirt); binaryWriter.Write(__instance.enableDepth); binaryWriter.Write(__instance.depthFocalSize); binaryWriter.Write(__instance.depthAperture); binaryWriter.Write(__instance.enableVignette); binaryWriter.Write(__instance.vignetteVignetting); binaryWriter.Write(__instance.enableEyeAdaptation); binaryWriter.Write(__instance.eyeAdaptationIntensity); binaryWriter.Write(__instance.enableNoise); binaryWriter.Write(__instance.noiseIntensity); __instance.cameraSaveData.Save(binaryWriter); for (int i = 0; i < 10; i++) { __instance.cameraData[i].Save(binaryWriter); } binaryWriter.Write(JsonUtility.ToJson(__instance.cameraLightColor)); binaryWriter.Write(__instance.cameraLightIntensity); binaryWriter.Write(__instance.cameraLightRot[0]); binaryWriter.Write(__instance.cameraLightRot[1]); binaryWriter.Write(__instance.cameraLightShadow); binaryWriter.Write(__instance.cameraMethod); __instance.bgmCtrl.Save(binaryWriter, __instance.version); __instance.envCtrl.Save(binaryWriter, __instance.version); __instance.outsideSoundCtrl.Save(binaryWriter, __instance.version); binaryWriter.Write(__instance.background); binaryWriter.Write(__instance.skybox); binaryWriter.Write("【PHStudio】"); } } __result = true; return(false); }
static bool Prefix(string _path, SceneInfo __instance, ref bool __result) { LightsSerializationData.Save(_path + ".lights_extdata"); __result = true; return(true); }