Welcome to my second post and second plug in!
Path Forger Version 1.0 is now Released and its free! This plugin is for developers to quickly work with referencing objects in studio!
PLEASE LEAVE SUGESSTIONS TO MAKE IT BETTER ETC OR REQUEST FEATURES!
The logo and icon are all temporary!
Background:
I am honestly surprised this isn’t already a built in function within studio. I got annoyed at having to transverse through the the explorer to get the path to an object so I decided to create a plugin to do this for me. This plugin allows you to select an object and then it will print the path to the object in lua format. This way you can copy and paste right into your code.
FEATURES:
At the current version, the plugin comes with 1 button. You click the object you want to reference (either in the workspace or explorer) and it will print out the path!
This would be more useful if you could copy and paste the path directly into the current selected line in a script, its kinda the same but some people doesn’t have the output always open, and it may be a bit annoying.
Something like: CTRL + SHIFT + C to copy and CTRL + SHIFT + V to paste. I don’t know if you get what i mean, but overall this may be cool if you do something like this
local ToolBar = plugin:CreateToolbar("Path Forger")
local FindPathButton = ToolBar:CreateButton("Print path to object","Prints the full path of the first object selected.","rbxassetid://95429555197638")
local Selection = game:GetService("Selection")
local function ResetButtonHighlight(Button)
Button.Enabled = false
Button.Enabled = true
end
local function getFullPath(Selected)
assert(Selected ~= nil, "No instances selected. Please selected one object.")
assert(Selected ~= game, "Invalid instance Selected")
return Selected:GetFullName()
end
FindPathButton.Click:Connect(function()
local selected = Selection:Get()[1]
local Path = getFullPath(selected)
ResetButtonHighlight(FindPathButton)
print("Full Path:", Path)
end)
Thanks however this is for getting the path without having to type it out or make a script to then print its full name. If you work with vs code you can right click on something then get its path. This is meant to act like that since if you right click an object there’s no option for getting and copying the path directly.
Yeah, I get what the plugin was intended for, I was more giving feedback on how you can further improve the plugin by utilizing built-in functions. It’s really up to you in the end to decide if you want to utilize those methods.
You can actually shorten it even more, you don’t even need to print it if your running it through command bar. Just put an equal sign at the beginning of the line.