DylanD Posted August 10, 2018 Share Posted August 10, 2018 Hello everyone I was wondering Is it intended that cloning a custom material makes a standard material? As in customMaterial.clone(){ return standardMaterial; } because in typescript that is what I get. Or is this a mix up Quote Link to comment Share on other sites More sharing options...
Sebavan Posted August 10, 2018 Share Posted August 10, 2018 Hello Dylan, Let s check with @NasimiAsl who is the mastermind behind the Custom Material. Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 10, 2018 Author Share Posted August 10, 2018 Thanks, this isn't immodestly impacting my progress so no rush, just curious Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 10, 2018 Share Posted August 10, 2018 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. Quote Link to comment Share on other sites More sharing options...
DylanD Posted August 13, 2018 Author Share Posted August 13, 2018 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. Sebavan 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.