Jump to content

Assigning different materials to the instances of the objects


Recommended Posts

clone the material of the clone.

so clone your object...
var Obj_B = Obj_A.clone("Obj_b", null, true);
Obj_B.material = Obj_A.material.clone();

Im not sure, if that will effectively save on anything because I assume when it clones the object it also clones the material?  Im not sure if it clones it or sets a reference to the original...  If its just setting a reference then changing anything on the new one I would imagine would effect all of the ones with that same material even if they were cloned objects (im not sure though), if its doing that then the above example will unlock your ability to change the materials without having to define new ones.

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.

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.


  • Recently Browsing   0 members

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