Jump to content

'Gaia.GaiaLighting' is missing the class attribute 'ExtensionOfNativeClass'!


Firle

Recommended Posts

Updated Gaia to the latest version. Using Unity 2022.2.1 in my project, windows standard built no hdrp or custom renderpipeline.

 

A question: can I turn off that gaia alway destroys existing terrains when creating a new one? I have multiple small terrains.

 

And I get this error when starting now, having 

 

'Gaia.GaiaLighting' is missing the class attribute 'ExtensionOfNativeClass'!
0x00007ff644f8a1cd (Unity) StackWalker::GetCurrentCallstack
0x00007ff644f8f179 (Unity) StackWalker::ShowCallstack
0x00007ff645f58061 (Unity) GetStacktrace
0x00007ff6466137b2 (Unity) DebugStringToFile
0x00007ff6466134ea (Unity) AssertImplementation
0x00007ff644f26001 (Unity) SerializableManagedRef::SetScriptCache
0x00007ff644e56be5 (Unity) ManagedMonoBehaviourRef::SetScriptCache
0x00007ff644f267bb (Unity) SerializableManagedRef::SetupScriptingCache
0x00007ff644f24e14 (Unity) SerializableManagedRef::RebuildMonoInstance
0x00007ff644e5f0b4 (Unity) SerializableManagedRefTransfer::RestoreBackup<SerializableManagedRefBackupGenerator>
0x00007ff644f256a6 (Unity) SerializableManagedRefsUtilities::RestoreBackups
0x00007ff644e7d5b8 (Unity) MonoManager::FinalizeReload
0x00007ff646250baa (Unity) ScriptingInitializer::FinalizeReload
0x00007ff6462c43d5 (Unity) ImportOutOfDateAssets
0x00007ff6462cf6b9 (Unity) RefreshInternalV2
0x00007ff6462d72bf (Unity) StopAssetImportingV2Internal
0x00007ff645dd9e6f (Unity) EditorSceneManager::RestoreSceneBackups
0x00007ff645ac3d76 (Unity) PlayerLoopController::EnterPlayMode
0x00007ff645ad3cb6 (Unity) PlayerLoopController::SetIsPlaying
0x00007ff645ad73db (Unity) Application::TickTimer
0x00007ff645f5dd1a (Unity) MainMessageLoop
0x00007ff645f62050 (Unity) WinMain
0x00007ff64732752e (Unity) __scrt_common_main_seh
0x00007ffe834b7614 (KERNEL32) BaseThreadInitThunk
0x00007ffe84c026a1 (ntdll) RtlUserThreadStart
 

Link to comment
Share on other sites

After using the Gaia Manager to update the scene (Setup scene, create world then create runtime) I now have plenty of errors:

 

Same as above and multiple times this one:

 

NullReferenceException: Object reference not set to an instance of an object
Gaia.WorldMap.GetOrCreateWorldMapStamper () (at Assets/3rdParty/Procedural Worlds/Gaia/Scripts/StampingSystem/WorldMap.cs:289)
Gaia.Spawner.CreateBaseTerrainStamper () (at Assets/3rdParty/Procedural Worlds/Gaia/Scripts/SpawningSystem/Spawner.cs:2483)
Gaia.Spawner.GetOrCreateBaseTerrainStamper (System.Boolean allowCreate) (at Assets/3rdParty/Procedural Worlds/Gaia/Scripts/SpawningSystem/Spawner.cs:125)
Gaia.Spawner.UpdateWorldDesignerPreviewSizeAndResolution () (at Assets/3rdParty/Procedural Worlds/Gaia/Scripts/SpawningSystem/Spawner.cs:3602)
Gaia.SpawnerEditor.OnEnable () (at Assets/3rdParty/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:191)
 

Any idea? Thanks! It was working before and still works but I get those when starting.

Link to comment
Share on other sites

I also have a warning:

 

The class named 'Gaia.GaiaLighting' is abstract. The script class can't be abstract!
0x00007ff7a115a1cd (Unity) StackWalker::GetCurrentCallstack
0x00007ff7a115f179 (Unity) StackWalker::ShowCallstack
0x00007ff7a2128061 (Unity) GetStacktrace
0x00007ff7a27e37b2 (Unity) DebugStringToFile

........

 

Any idea what's wrong?

Link to comment
Share on other sites

As I said the latest on the unity asset store. Without Random World Generator or anything else like that.

I am also using the latest version from Enviro but I think that does not affect it.

 

Thanks!

 

Link to comment
Share on other sites

Ok, thank you for that information. 

When creating a new world it would destroy the Unity terrains. 
What you would want to do before adding in another terrain is disable them in the Hierarchy before creating another one. 
If you are working in the same scene as another terrain / world. 

Enviro could cause some lighting issues, I know we used to have a Gaia eXtension for that but it has not been updated for Enviro. 
You could however, recreate the eXtension yourself by looking at this: 


 


Obviously this was for Gaia 2 and Gaia pro but mostly the same information still applies. 
 

Link to comment
Share on other sites

Thanks! After playing around with that Player settings I was at least able to build again.

 

But I still got this error message (I am not sure if it does anything bad):

'Gaia.GaiaLighting' is missing the class attribute 'ExtensionOfNativeClass'!

 

And if I turn on my landscape with an underwater scenario and turn it off again, I still can see a "Caustics" animated overlay.

 

How do I get rid of it? This is my code to turn on / off water stuff:

    public void SetWater(bool enable, bool isUnderSea = false, int waterLevel = 0) // SetSeaLevel
    {
        try
        {
            if (enable)
            {
                Gaia.PWS_WaterSystem.Instance.m_waterProfile.m_useCastics = false;
                if (GameManager.Instance.UnderWaterPostProcess != null)
                {
                    GameManager.Instance.UnderWaterPostProcess.enabled = isUnderSea;
                }

                // perfect underwater when real y is 70 and sealevel property is 35, todo
                //pWS_WaterSystem.SeaLevel = seaLevel / 2;
                //pWS_WaterSystem.transform.parent.parent.position = new Vector3(0, pWS_WaterSystem.SeaLevel, 0);
                //Gaia.PWS_WaterSystem.Instance.SunLight = Enviro.EnviroManager.instance.Lighting.MainLight;
                if (isUnderSea)
                {
                    Gaia.PWS_WaterSystem.Instance.SeaLevel = 64; //90
                    //Gaia.PWS_WaterSystem.Instance.m_minSurfaceLight = 0.01F;
                    //todoo test Gaia.PWS_WaterSystem.Instance.m_maxSurfaceLight = 0.01F;                    
                    //Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_specularColor = Color.white; //todo
                    Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_transparentDistance = 0.2f;
                    Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_underwaterFogDensity = 0.01f;
                    Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_constUnderwaterPostExposure = 0.01f;
                    Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_fadeStart = 5;
                    Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_fadeNormalStrength = 0.01f;
                    Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_fadeDistance = 150;
                    Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_underwaterFogDensity = 0.01f;
                    //Gaia.PWS_WaterSystem.Instance.gameObject.GetComponentInChildren<FollowPlayerSystem>().m_player = Globals.Player.transform;
                }
                else
                {
                    Gaia.PWS_WaterSystem.Instance.SeaLevel = waterLevel; // -25;
                    //Gaia.PWS_WaterSystem.Instance.SeaLevel = planetInfo.;
                    Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_underwaterFogDensity = 0.02f;
                    Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_constUnderwaterPostExposure = 0.3f;
                    Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_fadeStart = 40;
                    Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_fadeNormalStrength = 0.08f;
                    Gaia.PWS_WaterSystem.Instance.m_waterProfileValues.m_fadeDistance = 300;                    

                    //Gaia.PWS_WaterSystem.Instance.m_waterProfile.m_enablePostProcessing = false;                
                }
            }
            else
            {
                if (GameManager.Instance.UnderWaterPostProcess != null)
                {
                    Gaia.PWS_WaterSystem.Instance.m_waterProfile.m_useCastics = false;
                    GameManager.Instance.UnderWaterPostProcess.enabled = false;
                }
            }
            Gaia.GaiaUnderwaterEffects.Instance.enabled = enable;
            Gaia.PWS_WaterSystem.Instance.gameObject.SetActive(enable);
            Gaia.PWS_WaterSystem.Instance.transform.parent.gameObject.SetActive(enable);
        }
        catch (System.Exception ex)
        {
            Debug.LogError("Error in SetWater: " + ex);
        }
    }

 

Thanks a lot 🙂

Link to comment
Share on other sites

There is a component you can use to turn off water effects. 
I recommend making a cube collider or something similar and add the component disable Under water effects. 
 

Link to comment
Share on other sites

Thansk for the hint but I already disabled all components that should have impact here, see above code... 

 

looks like that if I had a underwater terrain before: 

 

https://www.dropbox.com/s/4fapwdy7pz343eo/Caustics.png?dl=0

 

On the left all water... components are disabled using above code. But it is still there and even animated....

 

Only seems to disappear if I turn off "Gaia Lighting" too or it's directional light child. But that would totally crash my light everywhere!

 

Are you sure it is not because of that strange "'Gaia.GaiaLighting' is missing the class attribute 'ExtensionOfNativeClass'!" error message I always get three times when starting my game?

 

Thanks!

 

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...