react-native-unity-play icon indicating copy to clipboard operation
react-native-unity-play copied to clipboard

Screen still black on reboot

Open taytortots23 opened this issue 4 years ago • 23 comments

I unchecked the options you told me to. However I still can't restart the unity project in the app without it become a black screen. Even just pressing the button to close it and restart it

taytortots23 avatar Jun 28 '21 16:06 taytortots23

to help - I need the project itself that you are running so that I can check it locally

azesmway avatar Jun 28 '21 16:06 azesmway

Okay, I can get that to you in about 5 minutes or so. It just needs to upload

taytortots23 avatar Jun 28 '21 16:06 taytortots23

Here you go https://drive.google.com/file/d/1P8qwx9LOjKDGv0S75X88f-LimeJRtgPu/view?usp=sharing

taytortots23 avatar Jun 28 '21 16:06 taytortots23

Which version of unity are you using to test btw?

taytortots23 avatar Jun 28 '21 17:06 taytortots23

image

azesmway avatar Jun 28 '21 17:06 azesmway

https://drive.google.com/file/d/1XlvT9Pedl5egjJTbnoFT1JsnbgyNG34P/view?usp=sharing

azesmway avatar Jun 28 '21 18:06 azesmway

What exactly is this?

taytortots23 avatar Jun 28 '21 18:06 taytortots23

I put together the project that you sent and made an apk

azesmway avatar Jun 28 '21 18:06 azesmway

Did you fix the issue?

taytortots23 avatar Jun 28 '21 18:06 taytortots23

no, I just put together a project I can tell you how

azesmway avatar Jun 28 '21 18:06 azesmway

Well the thing is if I wanted an apk I would have just make an apk. But what i was looking for help on was fixing my issue

taytortots23 avatar Jun 28 '21 18:06 taytortots23

Is my apk working correctly for you?

azesmway avatar Jun 28 '21 18:06 azesmway

Whether the apk works or not is irellavent. I can't put an apk in my react native project

taytortots23 avatar Jun 28 '21 18:06 taytortots23

do you want me to tell you how I build my project? or what?

azesmway avatar Jun 28 '21 18:06 azesmway

If what you did got it to work then sure

taytortots23 avatar Jun 28 '21 18:06 taytortots23

Here you go https://drive.google.com/file/d/1P8qwx9LOjKDGv0S75X88f-LimeJRtgPu/view?usp=sharing

I download this project open with unity image

uncheck image

export project for android dir image

change file - unity/builds/android/build.gradle

allprojects {
    buildscript {
        repositories {
            mavenCentral()
            google()
            jcenter()
        }

        dependencies {
            classpath 'com.android.tools.build:gradle:4.1.3'

        }
    }

change file - unity/builds/android/unityLibrary/build.gradle

//    implementation(name: 'native-toolkit', ext:'aar')
//    implementation(name: 'support-compat-27.1.1', ext:'aar')
//    implementation(name: 'support-v4-27.1.1', ext:'aar')

remove from file - unity/builds/android/unityLibrary/src/main/AndroidManifest.xml

      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>

copy all files from "unity/builds/android/unityLibrary/libs/." to "android/app/libs/."

make build

azesmway avatar Jun 28 '21 19:06 azesmway

I have the same problem, and I did all the steps you listed on your latest post. The problem is slightly hard to reproduce because it doesn't happen all the time and it never happens when it's a development build from my computer. It only happens when I open the existing app from my phone, but it doesn't always happen. The unity view will say "made with unity" and show the logo, but then the view is black.

I was reading the logcat in Android Studio, and the only difference between when it does show up and when it doesn't is a line saying: UnityEngine.XR.Management.XRGeneralSettings:Awake() (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

SoDaBearJess avatar Jul 13 '21 20:07 SoDaBearJess

No error is there but still the Unity app is not loading, need support for plain boilerplate code for react-native and unity.

codyyz avatar Oct 03 '21 17:10 codyyz

No error is there but still the Unity app is not loading, need support for plain boilerplate code for react-native and unity.

Hi! For this i need a simple unity project that i could use as an example

azesmway avatar Oct 11 '21 16:10 azesmway

No error is there but still the Unity app is not loading, need support for plain boilerplate code for react-native and unity.

Hi! For this i need a simple unity project that i could use as an example

Thanks, this drive link has both basic unity and react native code:

https://drive.google.com/drive/folders/16WXe0eldVSvavQF4cFpoWneEDGe76VE_?usp=sharing

I have tried the same unity (In 2020.3.15f1 and 2020.3.19f1) code with reactnative 0.64.1, 0.65.1 and 0.66.0

codyyz avatar Oct 11 '21 19:10 codyyz

No error is there but still the Unity app is not loading, need support for plain boilerplate code for react-native and unity.

Hi! For this i need a simple unity project that i could use as an example

Thanks, this drive link has both basic unity and react native code:

https://drive.google.com/drive/folders/16WXe0eldVSvavQF4cFpoWneEDGe76VE_?usp=sharing

I have tried the same unity (In 2020.3.15f1 and 2020.3.19f1) code with reactnative 0.64.1, 0.65.1 and 0.66.0

Add Example https://drive.google.com/file/d/1D3oaHstzlmIAvIqzbwfSTwlonxJev7Yh/view?usp=sharing

I used another unity project. if, according to my example, you cannot start your project - write

azesmway avatar Oct 12 '21 10:10 azesmway

I used MacOS and iMac for build project And Android Studio & Xcode

azesmway avatar Oct 12 '21 10:10 azesmway

No error is there but still the Unity app is not loading, need support for plain boilerplate code for react-native and unity.

Hi! For this i need a simple unity project that i could use as an example

Thanks, this drive link has both basic unity and react native code: https://drive.google.com/drive/folders/16WXe0eldVSvavQF4cFpoWneEDGe76VE_?usp=sharing I have tried the same unity (In 2020.3.15f1 and 2020.3.19f1) code with reactnative 0.64.1, 0.65.1 and 0.66.0

Add Example https://drive.google.com/file/d/1D3oaHstzlmIAvIqzbwfSTwlonxJev7Yh/view?usp=sharing

I used another unity project. if, according to my example, you cannot start your project - write

Thanks a lot for the example code, due to which could see reference code. This help in creating custom build and is now working on same environment.

codyyz avatar Oct 17 '21 16:10 codyyz