Jump to content

Clone Custom Material


DylanD
 Share

Recommended Posts

Maybe just make a support function that you can pass the custom fragments to in a constructor and then have it “rebuild” the custom material when you need to clone it. 

And have the function bind the custom parts set with the constructor after it gets initialized.

Link to comment
Share on other sites

On 8/10/2018 at 4:45 PM, Pryme8 said:

Maybe just make a support function that you can pass the custom fragments to in a constructor and then have it “rebuild” the custom material when you need to clone it. 

And have the function bind the custom parts set with the constructor after it gets initialized.

This is a good idea.  But the material I need was actually just the diffuseTexture (mine specifically uses a texture from a server, so less load time I think) of that custom material so I had done clone just because I know it is slightly better to clone than to make a whole new one, so I just ended up cloning before editing the .Fragment_Before_FragColor which lets it work.

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...