Skip to content

Development Locations

freezy edited this page Jan 5, 2021 · 2 revisions

We have a bunch of repositories now, and it's not always obvious where to put what. This should give a quick overview. Here again the dependency graph of the repos:

image

In main, we keep everything that is:

  1. Render pipeline agnostic
  2. Light (i.e. no heavy assets)

More specifically, that is:

  • VisualPinball.Engine - Unity-agnostic code. Currently covers that data layer.
  • VisualPinball.Engine.Test - Our unit tests.
  • VisualPinball.Resources - Unity-agnostic resources. Should be moved into vpe.assets at some point.
  • VisualPinball.Engine.Unity - Unity-specific code.
    • Assets - Small render pipeline-agnostic assets.
    • Plugins - Our dependencies coming from NuGet
    • VisualPinball.Unity - Unity-specifc runtime code
    • VisualPinball.Unity.Editor - Unity-specific editor code
    • VisualPinball.Unity.Patcher - Patcher code for our test tables, not used during runtime
    • VisualPinball.Unity.Test - Unity test suite (still unused).

In vpe.assets, we keep the heavy assets using git LFS. Most of the assets are render pipeline-agnostic. However at some point there might be assets like mask maps which are HDRP-specific. These will be marked as such by putting them in an HDRP folder. The general structure of the assets folder is the same for all repositories and documented in the last section.

There is also a Runtime folder which just contains an AssetPath class that provides easy access to assets that need to be loaded programmatically.

In vpe.hdrp, we keep everything HDRP-specific (apart from large assets - see previous section). This gives us access to the HDRP API via code and separates assets that are only compatible with this pipeline.

There are three folders:

  • Assets - All HDRP-specific assets
  • Editor - HDRP- and editor-specific code. Excluded during runtime.
  • Runtime - HDRP- and runtime-specific code.

The vpe.urp repo follows the same principles as vpe.hdrp, but for the Universal Render Pipeline instead of HDRP.

This is the actual Unity project users are opening when starting with Unity. It includes the setup for the scoped registry, the correct dependencies, a sample scene with adequate HDRP settings and a few more things.

It's not the player project we will ship (that one doesn't exist yet), but rather a project that makes developing tables as comfortable as possible.

Asset Folders

Most of the packages above have an Asset folder. In Unity this is basically the root folder, which comes with its own special folder names.

Within our Asset folders, we use the following conventions:

  • Art - Contains artistic assets. Materials, textures, meshes, animations, sounds and so on, used during runtime.
  • Editor - Contains assets that are used only in the editor and are stripped at runtime. Example are editor icons or window layouts.
  • EditorResources - Assets that are used during runtime, but only relevant in the project scenes used during development.
  • Resources - Assets that are loaded during runtime (as opposed to be referenced in the scene).
  • Settings - Setting-related assets like HDRP config, lighting settings and whatnot.
  • Shaders - Shader code or graphs.