I want to import decals with StudioService | Roblox Creator Documentation without using temporary asset ids since only you can see the decals if you use temporary asset ids, correct me if i’m wrong.
Here is the code:
local Studio = game:GetService("StudioService")
local Decal = Instance.new("Decal")
Decal.Parent = game.Workspace
local obj = Studio:PromptImportFile({"png"})
Decal.Texture = obj:GetTemporaryId()
The best thing you can do is relocate your decal files into AppData\Local\Roblox\LocalAssets (I believe, it’s been a long while since I last edited the default path)
You can then access the images using rbxasset://relative path to image (e.g. if you have a folder named “Images” under LocalAssets, do rbxasset://Images/Decal1.png)
Will this work if I want to upload a tremendous amount of images at once? Because I made a plugin for animated skybox, it has to loop through alot of images.
(Nevermind I misunderstood)
Ah, well if you’re making a plugin, the above suggestion I made will not work on more than one device. Only you will see them. You will still have to rely on temporary asset IDs.
Why must you need not to use temporary IDs when importing?
That’s the purpose of temporary asset IDs. They exist on the device only, not online, thus why it is called “temporary IDs”. You’re not uploading them, you’re simply letting Roblox Studio use the files you’ve imported only in the current session. Once you leave, they’re gone.
Well I know you can use bulk import but it uploads the images then you have to import them into roblox studio by double clicking them, if you have alot of images it’s gonna take too long.
That’s part of how decals in any game are displayed. You upload them and drag and drop them to something solid in Studio. In your case, you copy the ID of an image and paste it to any side of the Skybox.
Which is also a method done by numerous people, especially in ancient Roblox times. If you don’t mind about the quality of your decals, you can simply downscale them to a size that will be fast enough to upload.
There are no solutions other than to batch upload the assets.
Oh yeah, you can also just add the asset IDs to a table in order, and loop through each ID to animate the skybox, if that’s easier for you.
Why would you need that many frames? Do you really need to have that many? It will not be worth the detail as each image will cost your players some amount of memory, and if you got 1000 images, your players’ devices will struggle.