Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feedback Unity's asmdef names should match namespace names

Discussion in 'Scripting' started by Kamyker, Sep 15, 2020.

  1. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,084
    I find it very weird, unintuitive and like a waste when I have to look through bunch of different asmdefs to get something simple running.

    For ex. camera stacking in URP:
    Code (CSharp):
    1. var cameraData = camera.GetUniversalAdditionalCameraData();
    2. cameraData.cameraStack.Add(myOverlayCamera);
    After reading that I go to Scripting API section, look for the method/class and it's:
    UnityEngine.Rendering.Universal.UniversalAdditionalCameraData
    .
    All good, now, it always takes some time to find correct asmdef, in this case it's
    Unity.RenderPipelines.Universal.Runtime
    .

    Another bad examples:
    - TMPro namespace is in Unity.TextMeshPro
    - UnityEditor.AddressableAssets.Build.DataBuilders namespace is in Unity.Addressables.Editor
    - UnityEditor.Build.Pipeline namespace is in Unity.ScriptableBuildPipeline.Editor

    Good examples:
    - Unity.Mathematics namespace is in Unity.Mathematics asmdef
    - Unity.Burst namespace is in Unity.Burst asmdef
     
    qCring likes this.
  2. qCring

    qCring

    Joined:
    Jan 9, 2017
    Posts:
    7
    This is a very good point and might become increasingly important as more people start using asmdefs. Any feedback from unity-side on this topic?