Jump to content

Fishfinger

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Fishfinger

  1. Hello Modders!

    I'm developing a mod for the game that let's you load reference images directly into the editor so you can build around images, IN-GAME! It makes it really easy to make near-perfect replicas of real life vehicles.

    Thing is... I really need some help finishing this thing. I've ran into some problems when loading the texture into the game. KSP seems to be able to load the image, but not properly apply the texture to said image.

    That's where YOU come in! If you have any prior experience in Unity KSP modding I would love your help with loading these textures into the game.

    Thanks in advance for any help!

    Below are some screenshots of the mod doing it's thing:

    unknown.png

    unknown.pngunknown.png

  2. Hello Mod Community!

    I'm currently developing a mod which requires the selection of an or several image(s) by the player. Preferably I would like to do using the Windows File Explorer. I've tried two methods, using UnityEngine and another one using System.Windows.Forms. None of them worked and I've heard that apparently people have had issues with the file explorer when modding before...

    UnityEditor method

    EditorUtility.OpenFilePanel("Select reference image!", "", "png");

    Which gave me this error:
    unknown.png

    I heard the apparently KSP doesn't use UnityEditor so I added the UnityEditor.dll file into the plugins folder which changed the error from the beforementioned one to this one:

    unknown.png

    Anyone have any experience with UnityEditor and KSP modding, please let me know!

    System Windows Forms method

                string refImgPath = "";
    
                OpenFileDialog fileDialog_ = new OpenFileDialog();
                fileDialog_.InitialDirectory = @"c:\";
                fileDialog_.Filter = "png";
                fileDialog_.RestoreDirectory = false;
    
                if (fileDialog_.ShowDialog() == DialogResult.OK)
                {
                    refImgPath = fileDialog_.FileName;
                }
                Debug.Log(refImgPath);

    Which gave me this error:

    unknown.png

    I didn't know where to continue from here, anyone know what's wrong?

    Basically I need help with getting an file (image) explorer window working to get the path to any given image. Thank you in advance for any help!

×
×
  • Create New...