Skip to content

FileOrganisation

Fridolin Wild edited this page Feb 12, 2024 · 8 revisions

Top-level structure

We have been careful about the placement of the asmdef files, as they determine into which DLL the script is compiled. All scripts in the same folder as the asmdef file or in child folders are grouped together for the compilation.

We paid close attention to renaming folders, as some need to have special names for Unity to pick up on. We removed the top-evel 'Editor' as it is ambiguous and Unity uses this as a special name for UI elements inside the Unity editor. Objects in a 'Resources' folder are loadable by script with a special method, but these assets are also always compiled into the build, no matter whether we use them or not. So, we checked carefully whether assets actually need to be in such Resources folder, and we have put all needed ones into sub-folders in their according place (e.g. Config).

File Description
Common
Config
ContentTypes
Controllers
DataModel
Design
GeneralMedia
Logo
Managers
Player
Prefabs
Resources
Scenes
Scripts
Search
Services
Tests
Tiltbrush
Tutorial

old files are now relocated as follows

editor/icons -> logo/app-icons
editor/* -> config
editor/Logo -> logo/app-icons (consider renaming files to specify whether hololens or ios or android)
common/AssetBundles -> (requires update in Editor/CreateAssetBundles.cs, only character models at the moment)
MirageXR.asmdef -> leave here, cannot be moved (or can it be moved to config/?)
OLDS_Stuffs -> delete
Players/Augmentations -> content-types
Common/Sounds -> delete if not used anymore (if used, move to general-media/sounds)
Common/Scenes/test.unity -> broken, seems not to be used anymore
Common/Scenes/* (rest) -> scenes/
Common/Resources/SplashScreen -> logo/SplashScreen
Common/Resources/vestConfig.json -> config
Common/Resources/Prefabs/ServiceManager.prefab -> config/vest/VestServiceManager.prefab
Common/Resources/Prefabs/SphereHighlight -> delete if not used anymore
Common/Resources/Prefabs/GlobalKeywords.prefab -> delete, if not used anymore, has broken script references
Common/Resources/Prefabs (rest) -> delete, if not used anymore? some prefabs are broken!
Common/Resources/AR -> is this the grid? then move to managers/grid/Resources
Common/Resources/Materials -> not sure
Common/Resources_moved/CalibrationTool.prefab -> managers/calibration/CalibrationTool.prefab
Common/Scripts/DataModel /* -> data-model
Common/Scripts/DeepLinks -> config/DeepLinks
Common/Scripts/ExperienceAPI -> services/ExperienceAPI
Common/Scripts/ExperienceAPIClientCredentials.cs -> services/ExperienceAPI
Common/Scripts/LearningHub -> delete, as not used
Common/Scripts/Managers -> managers
Common/Scripts/MQTT -> services/MQTT
Common/Scripts/Services/Configurations/VestServiceConfiguration.cs -> config/vest/
Common/Scripts/Services (rest) -> services
Common/Scripts/CombinedEditor/ActionDetailView -> content-types (but put each in its own folder!)
Common/Scripts/CombinedEditor/AnnotationEditor.cs -> rename to ContentTypesEditor.cs
Common/Scripts/Sketchfab -> services/Sketchfab (consider moving the ModelManager.cs and ScrollableListPopulator.cs to its content-type model folder)
Common/Scripts/StaticVideoPlayer -> delete if not used anymore
Common/Scripts/UnitTestManager.cs -> tests
Common/Scripts (rest) -> scripts
Resources/.txt -> config/Resources
Search/Fonts -> general-media/Fonts
Search/ -> is this the grid? move to managers/grid/
Tests/NewUI -> scripts/UI
Tests/* -> tests/
Tiltbrush -> content-types/Tiltbrush
Player/Models/Glyphs -> content-types/glyphs
Player/Models/FakeFloor.prefab -> managers/calibration/
Player/Models/ (rest) -> delete if not used
Player/Prefabs -> distribute to content-types folders
Player/Prefabs/ (rest) -> general-media/UI
Player/Resources/AR -> managers/grid/Resources
Player/Resources/Arrow -> delete if not used
Player/Resources/CalibrationImage -> config/Resources
Player/Resources/Icons/Action -> move to glyph content type folder
Player/Resources/Icons/Editors -> move to their content-type folder
Player/Resources/Icons/RecorderIconAnimation.anim and RecordIcon.controller -> move to content-type if still used
Player/Resources/Icons/Vfx move to vfx content type folder
Player/Resources/Objects/ -> move to their content types folders
Player/Resources/Prefabs/Calibration -> managers/calibration/
Player/Resources/Prefabs/EditorPanels -> move to tiltbrush ('drawing') content type
Player/Resources/Prefabs/ (rest) -> cleanup, some to go to UI folder
Player/Resources/SymbolSprites: allow, assemble, blanco, close, cut, disassemble, drill, inspect, lift, ... (all hand made icons!) -> delete, not used anymore
Player/Resources/SymbolSprites (all ISO warnings and hazards signs) -> move to content-type 'warnings' folder
Player/Scenes -> scenes
Player/Scripts/Augmentations -> content-types folders
Player/Scripts/Behaviours -> controllers/behaviours
Player/Scripts/IBMWatson -> services/IBMWatson
Player/Scripts/Managers -> managers
Player/Scripts/Moodle -> services/Moodle
Player/Scripts/Moodle/GridSettings.cs -> managers/grid/
Players/Scripts/Triggers -> controllers/Triggers
Players/Scripts/Utilities/ConfigEditors.cs -> config/
Players/Scripts/Utilities/MeasureTool.cs -> content type glyph folder
Players/Scripts/Tutorial -> tutorial
Players/Scripts/ARfoundation -> managers/calibration
Players/Scripts/Managers/BrandCustomizer.cs and BrandManager.cs -> config/