Well-met Posted June 5, 2021 Share Posted June 5, 2021 Hello In some mobs or character files sometimes various prefabs or effects are declared at the start of the file I do not understand the purpose of this, as everything seems to work fine even without that Pls explain someone thnx Link to comment https://forums.kleientertainment.com/forums/topic/130582-purpose-of-declaring-prefabs/ Share on other sites More sharing options...
IronHunter Posted June 5, 2021 Share Posted June 5, 2021 I believe correct me if I am wrong that its for asset preloading. Any prefabs in the file of another file will have their assets also loaded so that there is less delay when the prefab is spawned. Its part of the dynamic asset loading system. 2 Link to comment https://forums.kleientertainment.com/forums/topic/130582-purpose-of-declaring-prefabs/#findComment-1466714 Share on other sites More sharing options...
Well-met Posted June 5, 2021 Author Share Posted June 5, 2021 ah, i see thank you Link to comment https://forums.kleientertainment.com/forums/topic/130582-purpose-of-declaring-prefabs/#findComment-1466717 Share on other sites More sharing options...
CarlZalph Posted June 6, 2021 Share Posted June 6, 2021 In addition it also serves as dependencies so things can load in the proper order for like post inits and such, you can also see a lot in the forest prefab since it spawns off a lot of different prefabs for worldgen. Prefab = Class( function(self, name, fn, assets, deps, force_path_search) return Prefab(name, fn, customassets, worldprefabs) 1 3 Link to comment https://forums.kleientertainment.com/forums/topic/130582-purpose-of-declaring-prefabs/#findComment-1466718 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now