- Home /
discard unused objects
Is there a way, in unity, to discard unused elements? In Maya , for instance, there is a discard unused nodes or shaders from the edit pull down menu. it's just that this whole thing has been a learning experience and I have made a LOT of stupid scripts and gameobjects, reimported FBX files so many times that I have about 30 textures that are all the same yet only using one. I should have cleaned as I went but I didn't. I am assuming though that when you build the game all that extra junk gets weeded out. But is there a way to discard the unused elements while in edit mode
Answer by Landern · Jun 26, 2015 at 05:49 PM
This would be a very dicey feature to include in Unity, particularly because you can dynamically load most things and unity would never know that they are used or not.
You will need to clean up your own work.
You can certainly use the the fact that you can find references in the currently loaded scene by right clicking the assets and select it from the context menu. But there isn't an automagically button to remove everything you're not using.
I figured, but as far as my question about the final build....does unity toss out stuff it doesn't need to optimize the game? FOr instance having 30 duplicate textures. I'm less concerned about seeing extra stuff in the editor as I am about having it slow down the game when built. I mean I started with the S$$anonymous$$lth tutorial and basically did a mod of that so there is a whole folder of scripts and models that I am pretty sure I don't even use but am afraid to delete. Thanks for your reply, by the way
oops I posted in the answers rather than adding a comment, so here it is again in case it gets rejected by being in the answer field: I figured, but as far as my question about the final build....does unity toss out stuff it doesn't need to optimize the game? FOr instance having 30 duplicate textures. I'm less concerned about seeing extra stuff in the editor as I am about having it slow down the game when built. I mean I started with the S$$anonymous$$lth tutorial and basically did a mod of that so there is a whole folder of scripts and models that I am pretty sure I don't even use but am afraid to delete. Thanks for your reply, by the way
Your answer

Follow this Question
Related Questions
Begginers question, Simplifing a script, opening two doors with 2 overlapping triggers. 1 Answer
Character states using Unity animation system and StateMachineBehaviour 0 Answers
I apologize for the 'irrelevance' of this question... but? 0 Answers
Best way to make this code shorter? 2 Answers
how to make a game easier 2 Answers