Jump to content

Error initialize


TakeruGrima

Recommended Posts

Hello, I have an issue with the weather system, I have this error :

Initialize had a issue Object reference not set to an instance of an object This came from   at Gaia.ProceduralWorldsGlobalWeather.Initialize () [0x00161] in C:\_Anklebreaker\ReignOfDwarf\Reign-Of-Dwarf\Assets\Procedural Worlds\Gaia\Gaia Pro\Weather\VFX\Scripts\ProceduralWorldsGlobalWeather.cs:1962 
UnityEngine.Debug:LogError (object)
Gaia.ProceduralWorldsGlobalWeather:Initialize () (at Assets/Procedural Worlds/Gaia/Gaia Pro/Weather/VFX/Scripts/ProceduralWorldsGlobalWeather.cs:2116)
Gaia.ProceduralWorldsGlobalWeather:OnEnable () (at Assets/Procedural Worlds/Gaia/Gaia Pro/Weather/VFX/Scripts/ProceduralWorldsGlobalWeather.cs:1776)

 

This error is triggered everytime and I don't really know what's going on, it's something related to AudioReverb but I don't use this audio system. Is there a way to fix this error ?

Link to comment
Share on other sites

Can you please tell me what Unity Version you are using? 

 

Also can you please tell me what Unity Version you are using? 

 

Are you using the procedural world's sky? 

Link to comment
Share on other sites

Hi @TakeruGrima, I looked into this issue, and it seems like there would be an invalid or "empty" player transform assigned in the Weather object here:
image.png

Could you please check what is assigned here, and assign your player game object in here (if that is not the case already)? I additionally created a patch that will avoid this error in any case. Please find attached a .zip file, you can install the .unitypackage inside the zip via Assets > Import Package > Custom Package in the unity editor.

PWWeatherPatch.zip

Link to comment
Share on other sites

Hi @Peter thanks for your answer. I had a look at the Weather Object and the Player field is not empty, it contains a gameObject with this components on it :

  • cinemachine camera components
  • Wwise audio listener for our sounds

 

This error not showing up anymore but I have this one now :

Audio system is disabled, so AudioSettings.outputSampleRate cannot be queried. Please check the audio project settings.
UnityEngine.AudioSettings:get_outputSampleRate ()
AmbientSounds.AmbienceManager:Awake () (at Assets/Procedural Worlds/Ambient Sounds/Scripts/AmbienceManager.cs:151)

 

Is there a way to disable this behaviour because we don't use it ? It seems this error make our game crash sometimes.

Link to comment
Share on other sites

38 minutes ago, TakeruGrima said:

 

Is there a way to disable this behaviour because we don't use it ? It seems this error make our game crash sometimes.

It looks like wwise disables unity's audio system completely, which leads to the error message you are seeing. In this case I would remove the ambience manager from the camera / player completely and you should not get this error anymore.

Link to comment
Share on other sites

I would imagine this error coming directly from Unity its not going to matter is any game objects are enabled. 
The best course of action would be to remove Ambient Sounds from the project and then try to fix the Unity Audio. 
You may need to remove wwise as well. 

Then try to import Ambient Sounds and then see if the error continues. 
If not import wwise back in. 

Additionally I would do this in another project and see which is causing the issue itself. 
 

Link to comment
Share on other sites

On 10/1/2022 at 3:01 AM, Bryan said:

I would imagine this error coming directly from Unity its not going to matter is any game objects are enabled. 
The best course of action would be to remove Ambient Sounds from the project and then try to fix the Unity Audio. 
You may need to remove wwise as well. 

Then try to import Ambient Sounds and then see if the error continues. 
If not import wwise back in. 

Additionally I would do this in another project and see which is causing the issue itself. 
 

I removed Ambient Sounds but the code still try to access the script so it give me a warning. 

The referenced script on this Behaviour (Game Object 'AmbienceManager') is missing!

Link to comment
Share on other sites

Can you please check: 
Project settings - Player - Other - Scriptable Define Symbols. 
Then see if Ambient Sounds is still there if so please remove it from here. 

If its not there than see if you can clear the console and see if it goes away. 

 

Link to comment
Share on other sites

spacer.png

Here is the warning I got.

And in our build when we launch the game we sometimes have a crash when we load the scene that has Gaia & Gena features in it, and we don't know what could cause it but it happen only on this scene, and it been like 3 weeks we have this crash. We supposed that it comes from your audio system because it was the only errors & warning we get.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...