Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issues getting Softbody working
#1
Hello, new user here.

I read through the setup instructions and installed the necessary packages from here: 
http://obi.virtualmethodstudio.com/manua...html#burst

I'm getting this error popping up on my console:

Assets\Obi\Scripts\Common\Backends\Burst\BurstMath.cs(681,74): error CS8377: The type 'T' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'NativeList<T>'

I've tried starting a new project with Unity2020.311f1 and Unity 2021.1.5f1 and I'm getting the same error in both versions. I'm using Obi Softbody 6.3

I've been searching on the forum for a bit and I can't seem to get Obi up and running. Cheers in advance for any guidance or suggestions. Thanks!
Reply
#2
(23-11-2021, 04:55 PM)kokutouchichi Wrote: Hello, new user here.

I read through the setup instructions and installed the necessary packages from here: 
http://obi.virtualmethodstudio.com/manua...html#burst

I'm getting this error popping up on my console:

Assets\Obi\Scripts\Common\Backends\Burst\BurstMath.cs(681,74): error CS8377: The type 'T' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'NativeList<T>'

I've tried starting a new project with Unity2020.311f1 and Unity 2021.1.5f1 and I'm getting the same error in both versions. I'm using Obi Softbody 6.3

I've been searching on the forum for a bit and I can't seem to get Obi up and running. Cheers in advance for any guidance or suggestions. Thanks!

Hi there!

Sorry for the issue, I'm unable to reproduce this. What package versions you've installed? Just so that I can test the same setup you have.

Edit: the error says the type T in this declaration:
Quote:public static unsafe void RemoveRangeBurst<T>(this NativeList<T> list, int index, int count) where T : struct

must be non-nullable, but it is constrained to be a struct so it already is non nullable...  Huh
Reply
#3
I did the same as the other poster suggested in this thread: http://obi.virtualmethodstudio.com/forum...-3197.html

That seemed to work! Changing:

Code:

Code:
where T : struct

to
Code:

Code:
where T : unmanaged
Reply
#4
(24-11-2021, 04:07 AM)kokutouchichi Wrote: I did the same as the other poster suggested in this thread: http://obi.virtualmethodstudio.com/forum...-3197.html

That seemed to work! Changing:

Code:

Code:
where T : struct

to
Code:

Code:
where T : unmanaged

Yes! Sorry about it, it was a timing issue. As Obi 6.3 was released, Unity released a new version of the Collections package that requires making this change for it to work.

I'm uploading a patched version to the store as we speak. Sorry for the trouble!
Reply