Ox_Lib Migration
Seamlessly migrate from ox_lib UI components to Prism_UI with no code changes required.
Recommended Migration (New Method)
Instead of manually editing every resource’s fxmanifest.lua, you can now load Prism_UI centrally via ox_lib.
Add the following code at the end of ox_lib/init.lua:
local PRISM_RESOURCE <const> = "prism_uipack"
if GetResourceState(PRISM_RESOURCE) == "missing" then return end
local success, err = pcall(function()
local code = LoadResourceFile(PRISM_RESOURCE, "init.lua")
if code then
load(code)()
end
end)
if not success then
error(("Failed to load prism_uipack. Error:"):format(err))
end This method automatically loads Prism_UI for all resources using ox_lib. You no longer need to modify every resource’s
fxmanifest.lua. Old Method (Legacy)
Previously, you had to add @prism_uipack/init.lua to the shared_scripts list inside each resource’s fxmanifest.lua:
shared_scripts {
'@ox_lib/init.lua',
'@prism_uipack/init.lua'
} Do not add this into the
ox_lib resource itself. It had to be added to every resource that used ox_lib. Last updated on