how do i get what the player has selected in the EditorUtility Window?

hello, so today i’ve been trying to make a script that basically makes the player be able to import a 3d model (only one) as a mod, but i can’t seem to get the file that the player has selected, it only instantiates the object that has the script on, if you want to help me, the script is this:

        using System.Collections;
        using System.Collections.Generic;
        using UnityEngine;
        using UnityEngine.UI;
        using System.IO;
        using UnityEditor;
        public class openFileSelector : MonoBehaviour
            public GameObject LockedCube;
            void Apply()
                Object obj = Selection.activeObject as Object; //this is where i try to get the selected 3d model that the player selected.
                if (obj == null)
                    EditorUtility.DisplayDialog("Select Map", "You must select an FBX first!", "OK");
                string path = EditorUtility.OpenFilePanel("Overwrite with FBX", "", "fbx");
                if (path.Length != 0)
                    var fileContent = File.ReadAllBytes(path);
                    Instantiate(obj); //this is where i try to instantiate the selected 3d model but instead it instantiates the gameobject that the script is put on.
                gameObject.GetComponent<openFileSelector>().enabled = false; //to prevent people from abusing the importing 3d model stuff.
            void Start() {
            void Update()

EDIT: i think this is the right page of the forums now, tell me if it isn’t.

EditorUtility.DisplayDialog returns a bool value. It’s true when player pressed OK, and false when they pressed Cancel

I really recommend checking documentation when you have questions like this. Unity docs are amazing and have tons of useful stuff like this