Unity.Physics 0.2.5-preview now out and about!

Hey everyone, hope you’re having a good day!

Here’s a little early holiday present for you. Unity.Physics 0.2.5-preview is now available to download using the Package Manager. Here’s a quick overview of what you can expect to find in this release:

  • Various bug fixes (yay!)
  • Updated a few package dependencies (Entities 0.3.0-preview.4)
  • Compatibility with LiveLink
  • Various Character Controller improvements

The Physics Sample received some small changes as well, including a package upgrade (LWRP 7.1.6)

For a more detailed list of changes, check out the changelog.

The LiveLink compatibility brings with it major improvements including but not limited to:

  • Conversion speed
  • Fixes for memory leaks when editing subscenes
  • Automatic instancing of colliders using the same shape, significantly decreasing memory usage

Please note that LiveLink compatibility is still experimental. Report any issues you find in this thread or using the Bug Reporter!

You may find that it’s also no longer possible to toggle the Debug Display and Simulation Type at runtime. This is not a bug, but intended behaviour.

8 Likes

Getting this on Mac
Unexpected exception System.IO.FileNotFoundException: Could not load file or assembly ‘Smash, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies.
File name: ‘Smash, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null’

What does MeshCollider.Create taking grouped indices mean?

Oh ok it takes an int3. Really don’t get that decision. So a UnityEngine mesh I have to create an array of int3, but oh wait Create then just copies them to an array of int. It forces a completely unnecessary copy, and unnecessary transformation for the end user.

Given most end users won’t use unsafe pointer ops, how about if you leave the NativeArray overloads and do a memcpy to int3? So keep supporting the format everything outside of Unity.Physics is using and make it more performant then most user implementations would do.

2 Likes

Just use NativeArray.Reinterpret.

[ ]'s

Sure but why should everyone have to do that, if it’s that common which it will be, it should just be an overload.

Restart the unity client, this is very common when updating Burst.

1 Like

This update seems to break the NetCode samples (0.2.4 works fine)

1 Like

Sadly I can’t get it to work in a build. When I try Unity Physics in the editor and play mode, all is working well. But the moment I build the project and run it the cube just starts right inside the center of the plane that it’s supposed to fall on to.

Here’s what it does in playmode inside the editor:
OrneryHandsomeIlsamochadegu

And here’s what it does in the build:

EDIT: I’ve managed to get the build working by limiting the target frame rate to 60 fps.

I upgraded a rather simple project from physics 0.2.4 to 0.2.5 (no other changes), and got this error:

The line where this error stems from (SceneInitializer.cs:35) does this:

Entity characterPrefabEntity = GameObjectConversionUtility.ConvertGameObjectHierarchy(CharacterPrefab, conversionSettings);

Basically, I made a prefab for a character, and I’m converting it to Entity representation for faster instantiating and for setting data on it directly after instantiating.

Any ideas? I tried restarting Unity, deleting Library folder, etc… no success so far

Saw a similar error message solved here: Cant Convert GameObject to Entity in 0.3 version - Unity Engine - Unity Discussions

Not sure if they had exact same situation as yours.

oh thanks! The fix from that thread solved it

Hey everyone!

We recently pushed out a patch release (0.2.5-preview.1) for the package that solves a couple small issues with LiveLink.

The NetCode samples breaking is a known issue and should be fixed in the next Entities release. If you’re feeling adventurous, you may try to fix it in the package manually. Find the file GameObjectConversionSettings.cs and in it add this line in the Fork method (at around Line 46): BlobAssetStore = BlobAssetStore,
This isn’t a fully tested fix and might bring its own problems so proceed with caution.

5 Likes

i did this and so far no bad side effects, only thing is you need to redo it each time you open the project up

^ likewise