0
\$\begingroup\$

A typical Unity project comes with some default assets. For example, look at these 2D sprites:

Unity default assets

The Square asset is the default Sprite that gets applied to a GameObject when you go 2D Objects > Sprite > Square in a Unity Scene, like this:

UI of unity showing the creation of a 2D sprite

Because of that, they're very handy when you're just starting out a project, and you haven't made any graphics for it. But once you've done that, the concern is that these assets are still getting stored when you build a .exe file for your project, taking up space in memory while not actually being used in the Unity project. If they are, I want to remove them, since I'm no longer using them.

I found this discussion thread on the Unity forum which seems to suggest that they could be removed when the project is built, but I can't tell if they're talking about the same thing I am in that discussion thread. Further, in the build for my project, I'm getting a folder called MyProjectName_Data, which then contains a folder called Resources, and then a ~1 KB file called unity default resources. So this would suggest to me that they are still being shipped when I build the project.

So, my question is:

  • Are they getting exported when I build the project?
  • Are there any copyright or legal liability implications to distributing these assets inside my Unity game build?
  • How can I delete them?
\$\endgroup\$
6
  • 1
    \$\begingroup\$ This is a valid question, but on a practical level, 1kB of download size might not be worth worrying about. Just because the file is on disc does not necessarily mean it gets loaded into RAM. You're likely to see far greater gains in memory or download size by spending the same effort investigating texture optimizations, for example. \$\endgroup\$ Commented May 12 at 21:17
  • \$\begingroup\$ @DMGregory Yeah. Another concern though is that I’m also worried about whether I may have any copyright related issues with regards to distributing certain assets despite their lack of use (not sure if these Unity ones fall under that, I thought I’d leave it out of this question as that’d make it too broad) \$\endgroup\$ Commented May 12 at 21:26
  • \$\begingroup\$ "Will an asset I've added to my project but left unused be included in a build" is a question worth asking separately. The short answer is "no, unless it's under a folder named Resources/StreamingAssets, or added to an AssetBundle or Addressable, but it doesn't hurt to delete it from your project folder to be 100% certain". \$\endgroup\$ Commented May 12 at 22:03
  • 3
    \$\begingroup\$ You're concerned whether Unity would deliberately put assets into every game made with their engine, and then prosecute their own customers for having those assets in their games? I get that Unity makes some poor business/developer relations decisions sometimes, but I think that one is beyond the realm of plausibility. 😉 \$\endgroup\$ Commented May 12 at 22:09
  • 1
    \$\begingroup\$ @DMGregory I suppose so, but I think it's a reasonable thing to ask, if one has never distributed a game made with Unity before, and who doesn't know anything about this kind of legal stuff. \$\endgroup\$ Commented May 12 at 22:15

1 Answer 1

2
\$\begingroup\$

To put your mind at ease for the immediate concern you raised in the comments:

No, Unity will not pursue you for copyright infringement for having default assets in your project that they put there.

I'll have to defer to other answers to address "how to check whether these assets are present" / "how to delete them", but hopefully this lowers the stakes to a matter of kilobytes instead of a matter of legal liability. 😉

\$\endgroup\$
2
  • \$\begingroup\$ Great, thank you for the clarification regarding this point 🙂 \$\endgroup\$ Commented May 12 at 22:34
  • \$\begingroup\$ Unity will also strip away any unreferenced Assets (that are not in StreamingAssets or Resources) \$\endgroup\$ Commented May 17 at 18:50

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.