How much reuse do you get from project to project?

Regardless of game type most games have common features, e.g.

  • UI - Menu / Inventory / Hi Scores
  • 3D Models
  • Textures / Substances
  • Skybox
  • Sfx
  • Particle FX
  • Controllers
  • Meta Logic - Score System
  • Pick Ups
  • Prefabs

And with Unity’s common engine, API framework and component system it should be easy to reuse/refactor code and items between projects.

Q1: So how much reuse do you get from project to project?

Q2: Could Unity make it easier to reuse items between games?

Q3: How do the professionals track and re-use assets, do they have databases/catalogues or libraries of assets?

2 Likes

Particle effects and models for prototyping projects. Also, don’t forget Editor Extensions from the Asset Store! Many of them are highly reusable.

Overall, for real projects, not much reusability since I don’t make universal scripts.

Doesn’t Unity has “Export Package” feature where you export an asset and its dependencies? What can be easier than that?

2 Likes

Yep. I’ve used it for loads of reusable assets.

Could the asset export work better as an Import e.g. use case

  • Start New Project.
  • Realise you can reuse something from an old project.
  • Find old project ‘Not always simple’.
  • Power up old project, could take multiple attempts, export assets.
  • Import Assets.
  • Close Down Old Project.

What if you could import assets into the new project with an external project viewer e.g.

  • Start New Project.
  • Realise you can reuse something from an old project.
  • Use Import Viewer to find old project and view assets.
  • Select needed assets and Import.

Surely this would be a workable* and cleaner import UX?

*There could be issues with Unity versions, but within a version range e.g. 5.x or 2017.x this could work and be easier?

Or simply being able to import multiple objects from the editor, rather than having to go through Windows Explorer to drop a bunch of stuff in the Asset folder.

1 Like

You can copy stuff between projects via file manager. You only need package export when you’re exporting scenes with COMPLEX references.

4 Likes

Please define [quote=“neginfinity, post:6, topic: 651740, username:neginfinity”]
COMPLEX
[/quote]
?

Scene with an object that references a material that references a shader and several textures all spread all across multiple folders.

Basically, pretty much the main reason why you would ever even want to export package in the first place is when you transfer a scene, and you want only transfer it without all the unnecessary and unused resources. A scene references meshes, materials, audio clips, scriptable objects, etc., and when they are not in the nearby folders tracking those down by hand will be major pain. Thats’ what package export is for.

Interestingly, internally unity handles references via guids, and those guids are stored within meta files. Because of this for majority of tasks just copying things via file manager should be sufficient, as long as you don’t forget the *.meta files.

1 Like

Wait, so in the end, I have to find my old project, which you mentioned is not always so simple.

Just have a dedicated folder full of .unitypackage files that contain reusable assets.

2 Likes

Yep, I do the same thing. If I have a thing I think I’m going to use more than once I typically make a unitypackage out of it pre-emptively even.

1 Like

Getting back to the topic, I think reusable materials would be:

  • Sounds (effects, not spoken lines)
  • Base substance library if you’re using it.
  • Code
  • Some of the music
  • Fonts
  • Textures for particle systems.

And pretty much everything else will have to be scrapped and recreated.

Might be wrong about it, but basically graphics evolve over time, graphic standards change, and that makes reusing old models/objects difficult and old objects will stand out as a sore thumb (as they say). Good portions of codebase, however, can be usually upgraded to the new project.

Might be wrong about it.

1 Like

I’ve always started a new project using my last project. End up having to rip out a lot of stuff specific to that last game but it still works to get a “jump start”.

Lately I have been reverting more and more to old practices so am focusing more on building game template projects that contain skeleton files and methods that I can detail in later.

Also I generally have a utility class/code file that can be dropped into any project to provide an easy wrapper for common functionality. For example, one of the first things I did in AGK2 is to create an InitDisplay method that wraps up the boiler plate so I can just specify width, height, window title and desired frame rate. Later I updated it to specify using Windowed mode or fullscreen.

Anyway completely agree with what you’re getting at. Reuse as much as we can to save time. Time is the only thing we can never get more of. No sense in wasting time writing the same utility functions and skeleton structures again and again.

Basically building a game dev library of code.

1 Like

Just recently I decided this was the most important thing in game dev, to make reusable assets so your next game can be spit out very quickly. It’s hell to always start a new project from scratch every time. Just need to do it once and well, and make the future of game dev 10x easier. Decided I should keep in the same art style, same UI style, similar types of games, etc to make the process more reusable. I will never jump ship anymore from like 2D to 3D, or Pixel to Vector, etc as making that process reusable is pretty much impossible. It’s crazy how much of your scripts from staying 2d pixel art really depend on the game staying 2d pixel art.

UI imo is one of the most important parts that take literally forever to make, and seems to always need to be refactored from every project or remade from every project. Decided to just do it properly once, and always have the assets ready. Properly I mean documented like crazy, structured nicely with no dependencies, etc.

I also figured I should make more useful reusable stuff like special importer scripts to handle importing of 2d assets, or button extensions, etc and to make sure they literally work by attaching the script and never worry about it again.

1 Like
  1. Forking
  2. Shared / common / agnostic tools have thier own repo.
  3. unity packages. (Export/import)
  4. custom export/conversion batch tools

For personal projects and prototyping, I use forking. I have a project called Core that has all my tools and common libraries and a handful of prototype/placeholder assets. Anytime I start a project I fork from that.

1 Like

And particle systems. I have ~30 basic ones that I always start with, saves a lot of time.

1 Like

I have about a hundred different projects scattered around. When I start a new one I typically copy and paste whatever I need in.

It’s not the most efficient system, but it works on a small scale.

2 Likes

I have a project that has all my sounds, and another that has all my particle effects. When I need something, I just go shopping in those two projects and ´export´ what I need. For what it is worth, since I only make 3d games, I also have a project file that is nothing but terrain textures, another for rocks, and another for plants ( I have thousands of plant prefabs). It is just easier to have them in their own projects and go shopping and export, rather than importing huge packages and then deleting most of the stuff.

I also have created an asset package that includes everything that I use for every project, which includes a bunch of editor scripts and some common tools. When I start a new project, I just drag that one asset pack into the scene and voila, everything is there.

Export Package - it is your friend, use it to create your own ´starter package´.

Just to add, you can also include things like a start menu, options menu, credits scene etc.

Again, create a new project, add nothing but your most useful tools, then add your ´always´ scenes like menus… then export everything into a pack.

5 Likes

Same here. Adding a suggestion: Import Unity Test Tools into this project, and set up thorough, automated tests in a separate folder. Whenever you make a change, verify your tests. It’s especially important for this project to be bulletproof since all your other projects will rely on it. You can exclude the test folder from your ‘starter package’, keeping your other projects smaller and tidier.

1 Like

As a solo Dev reusability is a big plus for me

1 Like

None of these address the need of multiple projects through a large organization, with multiple dev groups. The same way that we have a common code base to promote consistency and easy of use, we also need a single common assets base. I am desperately looking for a way to accomplish this. We can do this with code in .dlls but what about assets? Here is an example. And organization secures the rights to several fonts. No other fonts should be use as the organization needs to approve them. We need a single location for these fonts, that can be updated when a new fonts is approved and automatically “propagated” for use by all the projects we are working on. I can’t find a good way of doing this. It always comes down to “copies” and having different copy’s of an asset leads to problems figuring out who is using what. Plus the user needs to know what he/she is looking for and where.
Another example. We have two projects that use a base button in blue, the button is a prefab. You can go hunting for it and use it. Now the artist comes in and makes a new red texture for the button, and we want all our buttons to look the same way. He changes the prefab. But the guy on project (gameB) did not get the memo. So he did not go an get the new prefab and that project now is out of sink. :frowning: So what’s the solution? Any thoughts? Should the assets be embedded into a .dll ? Update the .dll and the assets come with it? Can that be done?