rive-app / rive-unity

MIT License
104 stars 11 forks source link

Is there any check to find if Rive will run or not on Android Device? #28

Open Saurabh7SSR opened 7 months ago

Saurabh7SSR commented 7 months ago

I have Unity sprite based fallback gameplay for devices that don't support Rive.

I think I read somewhere in your Rive Android docs that you do that to fallback to Skia when Rive isn't supported.

Saurabh7SSR commented 7 months ago

Claude says this:

package com.yourcompany.yourgame;

import android.opengl.GLES30;

public class PixelLocalStorageChecker { public static boolean isPixelLocalStorageSupported() { int[] params = new int[1]; GLES30.glGetIntegerv(GLES30.GL_MAX_SHADER_PIXEL_LOCAL_STORAGE_FAST_SIZE_EXT, params, 0); return params[0] > 0; } }

Saurabh7SSR commented 7 months ago

Also maybe this Angle c method in your webgl code can be used in other builds:

$preprocess_c_code: function(code, defs = {}) { if(code.indexOf('GL_ANGLE_shader_pixel_local_storage') != -1) { return code; }

pjarnfelt commented 6 months ago

Android support is crucial for us to adopt Rive. I am really eager to get it in our game, but without Android support, it's just not feasible. Anyone on the Rive team that can give us a outlook on this? @HayesGordon ?

damzobridge commented 3 months ago

Hi @pjarnfelt , the Rive plugin supports Android. Are you running into any specific issues on your Android devices?