Before you think about your code and assets being stolen and resold, you should think about whether your customers even have the ability to use software like Unity.
Unity is not specific to a given game and includes a range of features that your game might never include or use. On top of that Unity does have some learning curve and I personally found that I needed to buy and apply the Unity Game Essentials book just to get a sense of how things work and what does what.
It’s not exactly something that just anyone can pick up and use in a matter of minutes, especially not people who are more into playing the games with very little sense of how a game works internally.
Unity Editor could be suitable for advanced users who probably have other programming experience and are more hardcore-interested in modding games, writing their own scripts, getting their hands really dirty modifying and adding stuff etc. But this would probably severely limit the number of people who are capable of making a mod of your game.
Take something like the game Spore where many many many users can use a very simple user interface and specialized game-specific tools which allow them to use quite advanced technologies with very little effort or understanding of how they’re supposed to work. For those people, something like Unity is too low-level, even though Unity is quite a high-level interface. Or think about how Little Big Planet provides easy-to-use interfaces that focus more on placing objects quickly and easily than messing around with texture formats or writing scripts.
Also something I think you need to consider is what kind of freedoms you are giving your users. Typically when something is moddable, or has user-generated content, the design of the engine puts in place various limits as to what the user can change and how they change it. If the engine for example was scriptable but you couldn’t directly transfer assets to a generic application where you could just steal them, you’re placing a limit on what the user can do.
You really can’t give the user full openness to using your Unity game project within the Unity Editor and then expect them not to exercise their freedom to rip out the resources and use them elsewhere, or to do a minimally modified rip-off and sell it. In this sense I think using the Unity Editor as a modding platform has to bring with it either a stiff end-user agreement or you being okay with people using your stuff. Otherwise you’ll be crippling them, and you won’t be able to manage the piracy anyway.
I was thinking of doing an in-game editor recently myself because of these very reasons, and I just thought Unity would be too difficult for most users to generate content quickly. But even an in-game editor has to be very simple and provide quick results, leveraging advanced technologies with ease. The approach I was taking was going to require the user to manually define texture coordinates/mapping per object and that’s just too low level for most people so I gave up on it.
Think about your audience, who they are, what they’re capable of, and what they can do. If your audience is middle aged women for example, it’s likely (not trying to be sexist or whatever) that they aren’t going to appreciate having to get into Unity Editor just to exercise their creativity.