Jump to content

How to read the model from the cache, let it be displayed


zhang
 Share

Recommended Posts

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. 
 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...