zhang Posted July 11, 2017 Share Posted July 11, 2017 How to read the model from the cache, let it show, rather than in the case of caching to reload the model, so very costly performance Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 11, 2017 Share Posted July 11, 2017 Hello I do not understand your question Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 13, 2017 Share Posted July 13, 2017 Hi guys. @zhang - perhaps you want... mesh.setEnabled(true/false); ? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted July 13, 2017 Share Posted July 13, 2017 create a container object like cache= { meshType : mesh, meshType2 : mesh, meshType3 : mesh } and like @Wingnut said make them setEnabled(false); before you assign them to the cache (or after but that's kinda dumb order of opps). then when you need to use them just cache[meshType].clone(); or createInstance(); then setEnabled(true) on the clone or instance if it does not appear right away from the clone/instancing. Now if the object has children you need to recursively setEnabled on the elements or they will not appear. zhang 1 Quote Link to comment Share on other sites More sharing options...
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.