mkrebser / GPUInstance

Instancing & Animation library for Unity3D
Other
228 stars 44 forks source link

Android Doesn't Work At All #1

Closed hsnzkg closed 2 years ago

hsnzkg commented 2 years ago

Tested With

Due to some API changes on the Unity side, I changed all errors after that windows build, and (editor play mode) worked as expected I don't have any experience on shader(and also types and requirements)

On Android, there is two error

  1. GLSL link error: Error: BufferBlock BufferBlock location or component exceeds max allowed. (default and skinned mesh)
  2. Autoconnected Player Can't add component because class 'BoxCollider' doesn't exist!
  3. Autoconnected Player ArgumentException: The t parameter is a generic type. Parameter name: t

Is this project suitable for mobile? If so, what are the things I need to do to solve the current bugs ?

mkrebser commented 2 years ago

For #1, I've only ever tested this solution on windows. Was never really intended for Android. But most likely the device does not support some of the dx11 features like StructuredBuffers in the shaders, or perhaps too many compute buffers allocated- and likely just will not work on most Android devices.

SystemInfo.maxComputeBufferInputsVertex Might tell you how many StructuredBuffers can be supported in the shaders on your device

Other relevant links I found: https://forum.unity.com/threads/how-structuredbuffer-can-be-used-in-shaders-for-android.532240/ https://forum.unity.com/threads/max-number-of-compute-buffers-on-mobile.1049045/

For #2 and #3 Im not sure, box colliders aren't really needed for this project, you should provide the whole stack of where this error is occuring

hsnzkg commented 2 years ago

It's clear as you dig deeper, thanks a lot again.