Giter VIP home page Giter VIP logo

react-native-unity2's People

Contributors

danieldormann avatar mortend avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-unity2's Issues

mergeDexRelease FAILED when building Android release app

Hi, I got some issues related to duplicated classes when building Android release app. Can you suggest me a solution to solve it? Thanks.

Error log:
:app:mergeDexRelease FAILED ERROR:/Users/abc/Projects/abcx_build/abcXRN_android/unity/android/build/.transforms/d4b3eb04f966925a1fca56c0483736a4/transformed/jetified-unityLibrary-release-runtime/classes.dex: D8: Type org.fmod.FMODAudioDevice is defined multiple times: /Users/abc/Projects/abcx_build/abcXRN_android/unity/android/build/.transforms/d4b3eb04f966925a1fca56c0483736a4/transformed/jetified-unityLibrary-release-runtime/classes.dex, /Users/abc/Projects/abcx_build/abcXRN_android/android/app/build/intermediates/external_libs_dex/release/mergeExtDexRelease/classes4.dex com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Type org.fmod.FMODAudioDevice is defined multiple times: /Users/abc/Projects/abcx_build/abcXRN_android/unity/android/build/.transforms/d4b3eb04f966925a1fca56c0483736a4/transformed/jetified-unityLibrary-release-runtime/classes.dex, /Users/abc/Projects/abcx_build/abcXRN_android/android/app/build/intermediates/external_libs_dex/release/mergeExtDexRelease/classes4.dex Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:151) at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:138) at com.android.build.gradle.internal.tasks.DexMergingWorkAction.merge(DexMergingTask.kt:859) at com.android.build.gradle.internal.tasks.DexMergingWorkAction.run(DexMergingTask.kt:805) at com.android.build.gradle.internal.profile.ProfileAwareWorkAction.execute(ProfileAwareWorkAction.kt:74) at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63) at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66) at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62) at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:97) at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62) at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204) at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157) at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53) at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73) at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59) at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$2(DefaultWorkerExecutor.java:206) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:214) at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164) at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: /Users/abc/Projects/abcx_build/abcXRN_android/unity/android/build/.transforms/d4b3eb04f966925a1fca56c0483736a4/transformed/jetified-unityLibrary-release-runtime/classes.dex at Version.fakeStackEntry(Version_3.2.60.java:0) at com.android.tools.r8.internal.bi.a(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:68) at com.android.tools.r8.internal.bi.a(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:28) at com.android.tools.r8.internal.bi.a(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:27) at com.android.tools.r8.internal.bi.b(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:3) at com.android.tools.r8.D8.run(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:11) at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:136) ... 33 more Caused by: com.android.tools.r8.internal.a: Type org.fmod.FMODAudioDevice is defined multiple times: /Users/abc/Projects/abcx_build/abcXRN_android/unity/android/build/.transforms/d4b3eb04f966925a1fca56c0483736a4/transformed/jetified-unityLibrary-release-runtime/classes.dex, /Users/abc/Projects/abcx_build/abcXRN_android/android/app/build/intermediates/external_libs_dex/release/mergeExtDexRelease/classes4.dex at com.android.tools.r8.internal.uQ.a(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:14) at com.android.tools.r8.internal.uQ.a(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:22) at com.android.tools.r8.internal.yK.b(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:7) at com.android.tools.r8.internal.yK.a(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:23) at com.android.tools.r8.internal.yK.a(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:10) at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2048) at com.android.tools.r8.internal.yK.a(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:6) at com.android.tools.r8.graph.A2$a.e(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:4) at com.android.tools.r8.dex.b.a(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:105) at com.android.tools.r8.dex.b.a(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:28) at com.android.tools.r8.D8.a(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:26) at com.android.tools.r8.D8.d(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:593) at com.android.tools.r8.D8.b(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:1) at com.android.tools.r8.internal.bi.a(R8_3.2.60_61a204e00a4460bee78ec2913234dc5e1a3a501d9754e757835d117b7e302ba3:24) ... 36 more

Unity Player Not Closing

I want to close unity app/player when user press the back button to go to home page of react app. The problem is, unity player keeps running in background. I want to permanently close/kill it when user using react part of my app

unzip example not working

Hi Guys,
i tried the forlder example but with npm i and with tar -xf android.tgz
i have this error:
tar: Error opening archive: Unrecognized archive format

any idea?

OS: windows node 18.6

Seeking Advice on Memory Optimization for React Native and Unity Integration

When running Unity as a standalone application, I observe a memory usage of approximately 300 MB. Similarly, when running React Native as a standalone application, the memory usage is around 200 MB. However, when I integrate the two platforms to create a unified application, the memory usage ~ 1 GB.

I am eager to optimize the memory usage in order to achieve better performance. Could you kindly share some insights and recommendations on how to address this issue? I would greatly appreciate any guidance you can provide to help me optimize the memory usage in the integrated application.

Android app crashed when going from React Native to Unity second time

There are 2 parts in my app, the first one is built with React Native (for forms, settings, reports,...) and the second one is built with Unity (for games). Users can switch between the 2 parts when using the app. It works fine on iOS but not on Android.

The Android app crashed when going from React Native to Unity the second time, the first time has no problem.

Steps to reproduce:

  1. RN to Unity -> ok
  2. Unity to RN -> ok
  3. RN to Unity again -> crashed

Screenshot 2023-06-21 at 21 49 00

Screenshot 2023-06-21 at 21 43 50

Please help me to find the root cause to fix it.

Thanks.

Example project missing a file?

I am attempting to run the example project for iOS, but am blocked on Step 3. Add Unity-iPhone.xcodeproj to your workspace

Where does this file come from? I don't see it in the example folder of the repo, is it generated? If so, where and how?

npm i react-native-unity2 error

$ npm install react-native-unity2
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react-native
npm ERR! react-native@"0.70.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native@"^0.64.1" from [email protected]
npm ERR! node_modules/react-native-unity2
npm ERR! react-native-unity2@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\user\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache_logs\2022-10-20T13_17_15_089Z-debug-0.log

package.json:
{
"name": "sa4520_rn_unity",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
},
"dependencies": {
"react": "18.1.0",
"react-native": "0.70.3"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"@tsconfig/react-native": "^2.0.2",
"@types/jest": "^26.0.23",
"@types/react": "^18.0.21",
"@types/react-native": "^0.70.4",
"@types/react-test-renderer": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "0.72.3",
"react-test-renderer": "18.1.0",
"typescript": "^4.8.3"
},
"jest": {
"preset": "react-native",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
}
}

'UnityFramework/UnityFramework.h' file not found.

After I installed react-native-unity2 with yarn, I executed pod install, but I have not yet imported the Unity-Phone project in Xcode. After running react-native run ios, this error will be thrown in the terminal.

I'm not sure if the problem is caused by the fact that I'm using a virtual machine.

image

Failure to initialize!

I have encountered a problem and I don't know how to solve it. I am not an Android developer

Your hardware does not support this application

Failed to load 'libmain.so'

java.lang.UnsatisfiedLinkError: dlopen failed: library 'libmain.so' not found

Press OK to quit.

Generation of 2 apk on building the integrated project

After the integration of unity exports/project in the React Native project, when we generate the apk using assembleRelease/assembleDeploy, it results in generation of 2 different APKs

  1. react native unity integrated apk
  2. APK which consists of only the unity project

Could you please suggest a solution to get rid of 2 APKs
How do we alter the configuration of the react-native-unity-2 package to cancel out of the generation of unity project APK

lambda expressions are not supported in -source 7

/node_modules/react-native-unity2/android/src/main/java/no/fuse/rnunity/RNUnityManager.java:58: error: lambda expressions are not supported in -source 7
handler.postDelayed(() -> activity.runOnUiThread(() -> {
^
(use -source 8 or higher to enable lambda expressions)

Task :unityLibrary:BuildIl2CppTask FAILED

**Execution failed for task ':unityLibrary:BuildIl2CppTask'.

A problem occurred starting process 'command '/Users/satyamsen/satyam/gameApp/unity/builds/android/unityLibrary/src/main/Il2CppOutputProject/IL2CPP/build/deploy/netcoreapp3.1/il2cpp.exe''**

I am facing this issue
if you have any solution please share with me
Thanks

npm unable to download typescript-4.6.4.tgz from nexus.fuse.ninja when running npm install?

npm seems unable to download from this link during the npm install command npm install react-native-unity2

https://nexus.fuse.ninja/repository/npm-registry/typescript/-/typescript-4.6.4.tgz

I tried the link in my browser and it won't load there either, I'm just using a home network - no fancy proxy or VPN or anything of the like and I do all development on this home network.

Is there a ways to have these files stored somewhere other than a private website in case the worst should happen and the site went down as people wouldn't be able to use this react native implementation either.

Error:

npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://nexus.fuse.ninja/repository/npm-registry/typescript/-/typescript-4.6.4.tgz failed, reason: connect ETIMEDOUT 192.168.20.83:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

Missing react-native-unity2-1.0.0-rc.tgz

When trying to run example, I am getting the following error (running yarn in particular):

error "../react-native-unity2-1.0.0-rc.tgz": Tarball is not in network and can not be located in cache (["/Users/username/Downloads/react-native-unity2-main/react-native-unity2-1.0.0-rc.tgz","/Users/username/Library/Caches/Yarn/v6/.tmp/20d13a16f969169ae0c0ddc9dcf510ec/.yarn-tarball.tgz"])

I also couldn't find any file named react-native-unity2-1.0.0-rc.tgz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.