Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Following the getting started page for unity's new physics - objects disappear

Discussion in 'Physics Previews' started by TheCelt, Apr 17, 2019.

  1. TheCelt

    TheCelt

    Joined:
    Feb 27, 2013
    Posts:
    742
    I just followed the getting started page to make a basic box and a sphere physics objects in my scene.

    When i add "convert to entity" component to them, they disappear from the scene on play and the game pauses as if it error'd but i get no errors or any logs in console... just a game object called debug draw component which has nothing on it other than a transform.

    Am i missing something here? Why does this happen ?
     
  2. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    After conversion, objects move from gameobject scene view to entity world, it's normal for the converted items to get removed from the scene when you hit the play as that's literally what the convert to entity script does for the original gameobject by default after it's done creating the entity counterpart.

    As for the pause, that I have no clue about. I recommend checking the setups on UnityPhysicsExamples @ https://github.com/Unity-Technologies/EntityComponentSystemSamples/. Also make sure you actually have Physics Step script setup on your scene as well.
     
  3. TheCelt

    TheCelt

    Joined:
    Feb 27, 2013
    Posts:
    742
    Learning this stuff is getting increasingly more messy and scattered these days for unity.
     
    Marco-Playable likes this.
  4. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    The whole conversion workflow is temporary afaik. There's no ECS world editor right now so we need some way to get things easier to the ECS side, hence the conversion tools exist.

    If you need something polished and production ready, just keep using gameobjects and look at DOTS after few years :) Their official stance is that DOTS is somewhat production ready in 2022 according to their DOTS roadmap talk.
     
    BinaryByron likes this.
  5. TheCelt

    TheCelt

    Joined:
    Feb 27, 2013
    Posts:
    742
    Ah i see, i might wait for it to no longer be temporary before i get stuck into it then.
     
  6. JemsMIT

    JemsMIT

    Joined:
    Dec 23, 2017
    Posts:
    1
    @PixelizedPlayer I had exactly the same problem when I started to use the new physics system this morning. Turns out you need several packages installed in your project for this all to work, i.e. Entities, Mathematics and most importantly Hybrid Renderer which handles the drawing of meshes using ECS.
     
  7. RefugeZer0

    RefugeZer0

    Joined:
    Jan 28, 2018
    Posts:
    4
    The Unity Physics Getting Started page seems to be missing some important prerequisites. When you install the Unity Physics package, it also installs Entities, Jobs, Burst and Mathematics, but not the Hybrid Renderer package.

    Installing the latest Hybrid Renderer 0.5.0 results in all kinds of errors. Currently it looks like you need to install Hybrid Renderer <= 0.4.2 if you want compatibility with Unity Physics 0.3.2
     
    Sab_Rango likes this.
  8. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Just to make it clear, Hybrid Renderer is NOT required by Unity Physics. I have one project where I use Unity Physics but don't need or want hybrid renderer at all. You only need Hybrid Renderer if you want to render meshes on DOTS side, it has nothing to do with physics.

    Also pretty sure I've had latest physics, hybrid renderer and entities running on same project here, sometimes it's bit pain to get going because older packages tend to have older version requirements and Package Manager isn't always doing so great at resolving these (you may need to manually install some of the dependencies to newer version).
     
  9. StayThirsty

    StayThirsty

    Joined:
    Jul 6, 2013
    Posts:
    42
    The meshes disappeared for me too. I installed the Hybrid Renderer package and it was fixed. Whether hybrid renderer pulled in a dependency that was required by Unity Physics I don't know as I haven't checked yet.
    Im using Unity 2021.2.0b16.3733