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

Resolved Physics Shape / Physics Body missing

Discussion in 'Physics for ECS' started by Valon_Inc, Jun 11, 2023.

  1. Valon_Inc

    Valon_Inc

    Joined:
    Jul 14, 2018
    Posts:
    5
    Hello everyone,

    I recently started working with Unity DOTS and wanted to utilize the physics package for entities. I was following the instructions on https://docs.unity3d.com/Packages/com.unity.physics@1.0/manual/concepts-simulation-set-up.html. However, I can't seem to find the Physics Shape and Physics Body components either in the inspector or in the code.

    The only components I see in the inspector under "Add Component > Entities > Physics" are:
    • "Custom Physics Proxy"
    • "Physics Debug Display"
    • "Physics Step"
    • "Physics World Index"
    Am I missing something? Is the documentation still up to date?

    I am also encountering some infos, warnings and errors when installing the package. Could they be causing the problem?

    Code (Text):
    1. Leak Detected : Persistent allocates 30 individual allocations. To find out more please enable 'Jobs/LeakDetection/Full StackTraces' and reproduce the leak again.
    2.  
    3. NullReferenceException: Object reference not set to an instance of an object
    4. Unity.DebugDisplay.Managed..ctor () (at ./Library/PackageCache/com.unity.physics@1.0.10/Unity.Physics.Hybrid/Assets/DebugDisplay/Manager.cs:221)
    5.  
    6. Ignoring invalid [Unity.Entities.UpdateBeforeAttribute] attribute on Unity.Physics.Authoring.DisplayBodyColliderEdges_Editor targeting Unity.Physics.Authoring.PhysicsDebugDisplaySystem_Editor.
    7. This attribute can only order systems that are members of the same ComponentSystemGroup instance.
    8. Make sure that both systems are in the same system group with [UpdateInGroup(typeof(Unity.Physics.Authoring.PhysicsDisplayDebugGroup))],
    9. or by manually adding both systems to the same group's update list.
    10. UnityEngine.Debug:LogWarning (object)
    11. Unity.Debug:LogWarning (object) (at ./Library/PackageCache/com.unity.entities@1.0.10/Unity.Entities/Stubs/Unity/Debug.cs:15)
    12. Unity.Entities.ComponentSystemSorter:WarnAboutAnySystemAttributeBadness (int,Unity.Entities.ComponentSystemGroup) (at ./Library/PackageCache/com.unity.entities@1.0.10/Unity.Entities/ComponentSystemSorter.cs:472)
    13.  
    14. Ignoring invalid [Unity.Entities.UpdateBeforeAttribute] attribute on Unity.Physics.Authoring.DisplayJointsSystem_Editor targeting Unity.Physics.Authoring.PhysicsDebugDisplaySystem_Editor.
    15. This attribute can only order systems that are members of the same ComponentSystemGroup instance.
    16. Make sure that both systems are in the same system group with [UpdateInGroup(typeof(Unity.Physics.Authoring.PhysicsDisplayDebugGroup))],
    17. or by manually adding both systems to the same group's update list.
    18. UnityEngine.Debug:LogWarning (object)
    19. Unity.Debug:LogWarning (object) (at ./Library/PackageCache/com.unity.entities@1.0.10/Unity.Entities/Stubs/Unity/Debug.cs:15)
    20.  
    21. Ignoring invalid [Unity.Entities.UpdateBeforeAttribute] attribute on Unity.Physics.Authoring.DisplayColliderAabbsSystem_Editor targeting Unity.Physics.Authoring.PhysicsDebugDisplaySystem_Editor.
    22. This attribute can only order systems that are members of the same ComponentSystemGroup instance.
    23. Make sure that both systems are in the same system group with [UpdateInGroup(typeof(Unity.Physics.Authoring.PhysicsDisplayDebugGroup))],
    24. or by manually adding both systems to the same group's update list.
    25. UnityEngine.Debug:LogWarning (object)
    26. Unity.Debug:LogWarning (object) (at ./Library/PackageCache/com.unity.entities@1.0.10/Unity.Entities/Stubs/Unity/Debug.cs:15)
    27.  
    28. Ignoring invalid [Unity.Entities.UpdateBeforeAttribute] attribute on Unity.Physics.Authoring.DisplayBodyCollidersSystem_Editor targeting Unity.Physics.Authoring.PhysicsDebugDisplaySystem_Editor.
    29. This attribute can only order systems that are members of the same ComponentSystemGroup instance.
    30. Make sure that both systems are in the same system group with [UpdateInGroup(typeof(Unity.Physics.Authoring.PhysicsDisplayDebugGroup))],
    31. or by manually adding both systems to the same group's update list.
    32. UnityEngine.Debug:LogWarning (object)
    33. Unity.Debug:LogWarning (object) (at ./Library/PackageCache/com.unity.entities@1.0.10/Unity.Entities/Stubs/Unity/Debug.cs:15)
    34.  
    35.  
     
    chriscode likes this.
  2. Spy-Master

    Spy-Master

    Joined:
    Aug 4, 2022
    Posts:
    282
    You should have started by reading the pinned post
    https://forum.unity.com/threads/upc...-physics-and-havok-physics-for-unity.1421522/
    That or the page that’s literally linked on the page you refer to
    https://docs.unity3d.com/Packages/c...manual/custom-samples-physics-components.html
     
  3. Valon_Inc

    Valon_Inc

    Joined:
    Jul 14, 2018
    Posts:
    5
  4. chriscode

    chriscode

    Joined:
    Mar 2, 2015
    Posts:
    44
    Thanks for posting this query. I had exactly the same confusion!
     
  5. poritoshdavid

    poritoshdavid

    Joined:
    Oct 24, 2022
    Posts:
    7
    Just Import it from the sample.
    upload_2023-8-24_12-33-48.png
     
    JinxGBR, daniel-holz and layker90524 like this.