Search Unity

Question Help getting physics sample projects up and running

Discussion in 'Physics for ECS' started by jconsole, Jan 28, 2021.

  1. jconsole

    jconsole

    Joined:
    Oct 26, 2016
    Posts:
    10
    Sorry for how mundane this may seem but I've been pulling my hair out trying to get the DOTS physics demos up and running. I've

    Tried unity 2019.4.18f1 and 2020.2.2f1
    Tried unity physics package 0.4 and 0.6 (via Git URL com.unity.physics on 2020.2 build)
    Trying to download the git repo via url (https://github.com/Unity-Technologies/FPSSample.git) fails saying there's no git executable found. So I installed Git for Windows, then it said something like that there was no project file at the root of the git directory (similar to this https://answers.unity.com/questions/1582586/package-manager-using-git-repo.html). So I downloaded the zip of the repo and unzipped it using winzip into a folder and put that folder into the brand new project's Asset folder. It then compiles and spits out a ton of errors. Tracing them back I seem to get to compatibility errors between versions like ScheduleBuildBroadphaseJobs now using a bool rather than int at last argument (which here shows deprecation https://docs.unity3d.com/Packages/c...m_Int32__Unity_Jobs_JobHandle_System_Boolean_ ) so I chalked that up to differences in a too new 0.6 unity.physics build. I rolled back to 2019 and tried unity.phisics 0.4 and now I still get more errors e.g.:

    Assets\Sample Projects\EntityComponentSystemSamples-master\UnityPhysicsSamples\Assets\Tests\SamplesTest\SamplesTest.cs(14,27): error CS0246: The type or namespace name 'FixedStepSimulationSystemGroup' could not be found (are you missing a using directive or an assembly reference?)

    Assets\Sample Projects\EntityComponentSystemSamples-master\UnityPhysicsSamples\Assets\Tests\SamplesTest\UnityPhysicsEndToEndDeterminismTest.cs(20,27): error CS0246: The type or namespace name 'FixedStepSimulationSystemGroup' could not be found (are you missing a using directive or an assembly reference?)

    Assets\Sample Projects\EntityComponentSystemSamples-master\ECSSamples\Assets\HelloCube\2. IJobChunk\RotationSpeedSystem_IJobChunk.cs(27,27): error CS0246: The type or namespace name 'ComponentTypeHandle<>' could not be found (are you missing a using directive or an assembly reference?)

    It's been a few years since using Unity for me so I'm imagining the error is somewhere in my project import section. I've been searching for a few hours now and am giving up and posting this question. Thanks for any help!
    Cheers,
    J

    edit: also tried turning on allow unsafe code for player
     
    Last edited: Jan 28, 2021
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    Well, the readme says it all...
    ...which unfortunately is a common practice in the unity sample projects, demos, assets, etc.
     
    jconsole likes this.
  3. jconsole

    jconsole

    Joined:
    Oct 26, 2016
    Posts:
    10
    Hah! Well, thanks for pointing that out. One would have thought I'd catch that in all of this...
     
  4. TheOtherMonarch

    TheOtherMonarch

    Joined:
    Jul 28, 2012
    Posts:
    866
  5. jconsole

    jconsole

    Joined:
    Oct 26, 2016
    Posts:
    10
    Oh man, so I had pasted in the wrong git repo ... as TheOtherMonarch points out. That, indeed was the repo I was trying (and was the reason I didn't catch any note in the readme that Edy pointed out), though I was using the entire project with the non-physics demos, a level up from the UnityPhysicsSamples. Just now I finally got the physics samples to work and was coming here to say as much. I'm not sure what I did to get it to work, maybe it was only copying the files form the UnityPhysicsSamples folder right into my assets folder and not pasting the entire repo of ECS samples. Now I'm wanting to convert one of these script-made ragdolls into a prefab...
     
  6. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    This might help setting up your ragdoll in the editor, I talk a little about setting up a Hip Joint in the Unity Now talk.
     
    jconsole likes this.