Rick Posted January 22, 2014 Posted January 22, 2014 Does anyone know if there is a way to tell what prefab an entity was created from? Like the actual path and pfb file or do I need to track that myself? I was just hoping maybe Prefab:Load() added a key to the returned entity like "file", "Prefabs/Characters/zombie.pfb" or something. I think this would be handy to have if we don't already. Quote
norbert Posted January 22, 2014 Posted January 22, 2014 Hi Rick, you can do so if I have understood the question correctly. local planet planet = Prefab:Load("Prefabs/BlueFrozen/Planeten/Planet1.pfb") planet.script.Prefabs = "Prefabs/BlueFrozen/Planeten/Planet1.pfb" System:Print(planet.script.Prefabs) greeting norbert Quote
Rick Posted January 23, 2014 Author Posted January 23, 2014 Yeah, that would be the manual way. I was hoping LE set a key of the entity automatically as I would be using this for saving/loading of dynamically created prefabs. It would have just been less work for the user of the save/load script to not have to do that for every prefab that they create dynamically. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.