Nutshell Posted June 7, 2024 Posted June 7, 2024 Got a nullrefernceExpection: NullReferenceException: Object reference not set to an instance of an object UnityEditor.AssetDatabase.Contains (UnityEngine.Object obj) (at <aec3a143be31489f8782c487d4d86edd>:0) GeNa.Core.GeNaRiverExtensionEditor.OnEnable () (at Assets/Procedural Worlds/GeNa/Scripts/Editor/Extensions/GeNaRiverExtensionEditor.cs:20) What I did was: 1. Created 4x4 terrain with Gaia, spwan biomes 2. and under the tab of target scene(one of the tile terrain: Terrain_1_2-xxxx), add Gena instance - Add Spline - Added couple points - Added river extension to create river 3. I baked the river. 4. I hit play button and decided to delete river, so I delete river and all everything that Gena created. 5. and now, when I hit play, I will get NullReferenceExepction. --- the issues now is that, even if I delete the current scene. I would also get this error in a different scene( everything was fine before) when I hit play . Strange tho, do not why get how I get error on Secene B but error first occured in Scene A.
Bryan Posted June 8, 2024 Posted June 8, 2024 Yeah that error is basically saying its GeNa is trying to access something that isn't there. You would need to delete GeNa from the scenes. Aditional note: I would not delete something in playmode that can lead to a ton of issues not just with our tools.
Nutshell Posted June 8, 2024 Author Posted June 8, 2024 10 hours ago, Bryan said: Yeah that error is basically saying its GeNa is trying to access something that isn't there. You would need to delete GeNa from the scenes. Aditional note: I would not delete something in playmode that can lead to a ton of issues not just with our tools. well, I'm pretty sure that I deleted everything. And there is another secene that never used Gena before also throw this error.
Bryan Posted June 10, 2024 Posted June 10, 2024 You could try to bake everything you want to keep and save any custom spawners outside of the project. Then remove GeNa Pro completely from the project. Then check the scriptable define symbols and remove them if they are still there. These can be found in the project settings - player - other. Then reimport GeNa Pro. Something must of broke really hard to get this to happen although not sure what the cause of it could have been exactly. We will investigate this issue.
Solution Nutshell Posted June 11, 2024 Author Solution Posted June 11, 2024 well, thank you for the help. I think I have found out how to avoid this issue. Error Disappears: 1. If I delete everything related to Gena on the Hierarchy window, then save the scene 2. close Unity editor, and re-open the project. The null reference error are gone on all scenes. And I also found out how this error ocurred. my workflow was wrong. after 4*4 terrains were created, I should not add Gena(whether river or any spline) under Terrain_2-2-20240607-171659(see attached img). If I add Gena under "Island3", I wouldn't get null reference error, but instead will get a cross scene reference not surrported warning( this warnning will gone, if I delete Gena from Hierarchy window after I do not need use Gena anymore. )
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now