YouGroove Posted April 7, 2014 Share Posted April 7, 2014 I drag crawler three times on the scene, than i put different material on eahc, but in fact all crawlers have always same material ? How can i do to have crawlers not instanciated ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
josk Posted April 7, 2014 Share Posted April 7, 2014 This just doesn't happen with the Crawler, tried it with some other models and its the same. Just make a copy of the crawler in the Editor for each different one you need. Quote Elite Cobra Squad Link to comment Share on other sites More sharing options...
Rick Posted April 7, 2014 Share Posted April 7, 2014 This doesn't work at design time. The editor, by default, seems to use instancing at design time. You would have to either do as josk said and make copies (sort of ugly), or put placeholder pivots (or whatever) and attach a script that maybe has a property that is the prefab/model to use, and in the Start() function load the model yourself in a fashion that allows a unique set of materials (or completely new instance). Quote Link to comment Share on other sites More sharing options...
josk Posted April 7, 2014 Share Posted April 7, 2014 Am I right in thinking doing it the second way and loading a prefab will use less resources than just creating copies. Quote Elite Cobra Squad Link to comment Share on other sites More sharing options...
YouGroove Posted April 7, 2014 Author Share Posted April 7, 2014 or put placeholder pivots (or whatever) and attach a script that maybe has a property that is the prefab/model to use, and in the Start() function load the model yourself in a fashion that allows a unique set of materials (or completely new instance). Why complicating so much workflow ? I need some crawlers with some material , two others with another material, and some last oens wuth another material, i don't want to have to code anything. It should be easy to that very simple model copy and change materials. A simple checkbox : - Not instance - Or slot instance of wher you would drop the original crawler Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Rick Posted April 7, 2014 Share Posted April 7, 2014 @YouGroove I agree but today the editor just doesn't do that. The decision of what to do when you drag a model into the scene would best be made before it actually shows up (because the editor is using the engine to load the model too) so a checkbox on each entity might not work as it would have to show up first (pick a default loading way) and then based on what you check on that entity, change and reload, which is a little awkward. Maybe a prompt on each addition of a model to ask what you want (because there are really 3 options). Again, this could get annoying and be a pain in the workflow. I'm not really sure what the best method would be. A global checkbox that is used when you drag a model into the scene? The reason LE doesn't have this is because this was all new to 3.0. Prior to 3.0 we didn't have a choice. Everything was instanced and we had to deal with it. Quote Link to comment Share on other sites More sharing options...
Christian Clavet Posted April 7, 2014 Share Posted April 7, 2014 I use the CTRL key while moving the crawler and it create me another instance of it. If I modify it, and use the CTRL key while moving it, it will copy it. I don't think this is "slow". I must have missed something in your explanations... Quote Link to comment Share on other sites More sharing options...
Rick Posted April 7, 2014 Share Posted April 7, 2014 The "copy" you are making is actually an instance (unless I've missed something). Instances share the same material, which means if you apply 1 material to 1 of the "copies" they will all change. There are ways via code to make a 100% unique copy (they don't share verts, materials, anything). There is also a way to make a "soft" copy where they share the verts but not the material. Quote Link to comment Share on other sites More sharing options...
YouGroove Posted April 8, 2014 Author Share Posted April 8, 2014 PErhaps a simple solution : instancing : CTRL or COpy/paste to make instance of a crawler that is already in the scene. not instancing : drag a crawler in the scene and mark it no instance in a check box , copy/paste of it would be another crawler marker no instance. By default always instance, clicking check box no instance to make it no instance.Simple no ? ------------ How do i do if i want some crawlers to have texture damage and others not ? If i change material or texture by code will that be instanced on all others ? Quote Stop toying and make games 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.