Is there any way to exclude certain scripts from a build? These certain scripts aren't refrenced anywhere, so I basically don't need them. Also I don't attach scripts dynamically. Thanks
Code (csharp): /* //PutStuffHere */ or if you only want to remove it for specific builds Code (csharp): #if !Unity_IPhone //PutStuff Here #endif Note: if you put #if TEST you can then later enable or disable TEST to be able to add remove it depending on the time. Otherwise you cannot remove code blocks like you can assets from a build, because it's all compiled to one .DLL and can't properly interpret your scene files to see how they are used/added.
if you dont need them, why don't you delete the scripts? if you don't want to delete them, move them to another folder.
hippocoder, It's my understanding he is not talking about not using scripts already attached to objects, but rather removing script types from the executable as a whole. Could be wrong though.
Sorry, I didn't mean to come off condescending (it's hard to determine experience level sometimes in here). But no, there is no advanced method (outside of Platform specific defines i.e #if/#endif) of restricting included scripts.
You can add a folder called WebPlayerTemplates to your Assets folder and place any scripts you don't want compiled in there. The real purpose of this folder is to add (guess what) webplayer templates to your project but it is also a hack to take script files out of the project temporarily.