Closed appjitsu closed 2 years ago
here is the XCode log:
i noticed the following:
2022-03-08 10:54:46.891305-0600 unitypoc[4416:855298] Unbalanced calls to begin/end appearance transitions for <UnityDefaultViewController: 0x104c7d790>.
2022-03-08 10:54:46.891736-0600 unitypoc[4416:855298] Unbalanced calls to begin/end appearance transitions for <UnityDefaultViewController: 0x104c7d310>.
**UnloadTime: 4.775292 ms**
does that mean that ios is unloading Unity because there was a problem?
2022-03-08 10:54:44.712446-0600 unitypoc[4416:855298] [native] Running application main ({
initialProps = {
};
rootTag = 1;
})
2022-03-08 10:54:45.614893-0600 unitypoc[4416:855478] [javascript] Running "main" with {"rootTag":1,"initialProps":{}}
2022-03-08 10:54:45.628700-0600 unitypoc[4416:855478] [javascript] 0
2022-03-08 10:54:45.636966-0600 unitypoc[4416:855298] Built from '2020.3/staging' branch, Version '2020.3.29f1 (2ff179115da0)', Build type 'Release', Scripting Backend 'il2cpp'
2022-03-08 10:54:45.637759-0600 unitypoc[4416:855298] MemoryManager: Using 'Default' Allocator.
-> applicationDidFinishLaunching()
2022-03-08 10:54:45.699784-0600 unitypoc[4416:855298] Metal API Validation Enabled
Setting UIViewControllerBasedStatusBarAppearance to NO is no longer supported.
Apple actively discourages that, and all application-wide methods of changing status bar appearance are deprecated
-> applicationDidBecomeActive()
GfxDevice: creating device client; threaded=1
Initializing Metal device caps: Apple A11 GPU
Initialize engine version: 2020.3.29f1 (2ff179115da0)
2022-03-08 10:54:46.891305-0600 unitypoc[4416:855298] Unbalanced calls to begin/end appearance transitions for <UnityDefaultViewController: 0x104c7d790>.
2022-03-08 10:54:46.891736-0600 unitypoc[4416:855298] Unbalanced calls to begin/end appearance transitions for <UnityDefaultViewController: 0x104c7d310>.
UnloadTime: 4.775292 ms
onMessage:
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Rotate:onMessage(MessageHandler)
MessageHandlerDelegate:Invoke(MessageHandler)
UnityMessageManager:onRNMessage(String)
2022-03-08 10:55:25.759052-0600 unitypoc[4416:855478] [javascript] { handler: 'Now it is not rotating' }
I added the following code to App.js. There are no errors.
console.log("Unity created") is never called isReady is false UnityModule.sendMessage is never called
UnityModule.createUnity().then(() => {
console.log("Unity created");
}).catch((err) => {
console.log("Unity create error", err);
});
UnityModule.isReady()
.then((isReady) => {
console.log({ isReady });
if (isReady) {
UnityModule.sendMessage("HelloWorld", "Hello from React Native!");
}
})
.catch((err) => {
console.log("Unity isReady error", err);
});
i just tried Unity 2019 and it does the same thing: the Unity scene does not show, but I can send messages to Unity and vice versa.
I was having the same issue, downgrading to Unity version 2019.4.6f1 worked for me
OK i'll give that a shot. Thanks.
I was having the same issue, downgrading to Unity version 2019.4.6f1 worked for me
That was exactly it. Works perfectly now. Much appreciated!
I'm using Unity v 2020.3.29f1. The project builds fine and is running on an iphone 8. There are no build or runtime errors, but the scene is not being rendered inside react-native. I put a red background on the UnityView and I can see that it is full screen. I can see the messages coming back and forth from react-native and unity when I click the "toggle rotation" button.
I noticed that this version of Unity does not support OpenGL for iOS. Should I be using Unity v2019?