So I'm working on a survival game and every item or object with an interaction has an array that tracks extra behaviors, like custom objects. Is there any way I could have those arrays pre-loaded in studio instead of looping through any objects tagged as "CustomObject" under collection service and manually assigning them an array at game start?
game:IsLoaded() vs ContentProvider:PreloadAsync
Hi, aquathorn321.
I have found some articles that might help you out from the Roblox wiki, you can view them here. I have never used these so, I don't know if this is what you're looking for but, I hope this helps you out.
EDIT: Preload has been deprecated so, use this link instead.
https://developer.roblox.com/en-us/api-reference/function/ContentProvider/PreloadAsync
Here is something, I have never messed around with this before but it could help you with what you need. Just not too sure if the data that is set during runtime will also save.
AssetService has a few methods to do with place > api interfacing. There is int64 CreatePlaceAsync(string placeName, int64 templatePlaceID, string description)
which allows the creation of new places within a game and also there is void SavePlaceAsync()
which allows saving of the current place. I am not entirely sure this will work during runtime and what security level this runs at. However, you could always give it a try.
Hope this helps!