Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class Program {
- public static string Test() {
- PQS pPQS = FlightGlobals.currentMainBody.GetComponentInChildren<PQS>();
- Texture2D[] maps = pPQS.CreateMaps(8192, 4000, false, 0, Color.white);
- int i = 0;
- foreach (Texture2D map in maps)
- {
- byte[] png = map.EncodeToPNG();
- KSP.IO.File.WriteAllBytes<PQS>(png, "current_world" + i + ".png");
- i++;
- }
- return "Done!";
- }
- }
Add Comment
Please, Sign In to add comment