I've found a very serious problem. I'm using EnviroSky. As soon as a dialogue is displayed, I get "object of type 'Material' has been destroyed but you are still trying to access it." (referring to _volumeRenderingMaterial.DisableKeyword("ENVIROVOLUMELIGHT" in EnviroSky). Once I rinse and repeat this a few times, the system totally crashes.
Once the bug appears, moving the mouse starts moving random light sources in the neighbourhood in play mode (!) Then, no blue screen, but a hard reset. That is... an issue.
EnviroSky is a pretty common module used to render moon and sunlight in the world based on day time and date.
Note the lantern lamp with a black texture around it appearing (here at the right bottom) when manipulating the scroll bar in the conversation window. When I move the mouse a bit more, I get about three of these, all from lanterns in the neighbourhood. As said, when I "summon" this bug a few more times, the system suddenly resets.
http://www.dragonception.com/images/7.jpg
EnviroSky plus Dialogue System: hard system crash
-
- Posts: 30
- Joined: Sat Jan 19, 2019 2:14 pm
-
- Posts: 30
- Joined: Sat Jan 19, 2019 2:14 pm
Re: EnviroSky plus Dialogue System: hard system crash
P.S. A temporary workaround is to directly assign a Player & Camera in Envirosky (not using Assign On Runtime), but this is strange nonetheless.
Re: EnviroSky plus Dialogue System: hard system crash
I'm pretty sure you'll need to contact the EnviroSky developer to get a bug fix. But if you don't mind, please click on the "MissingReferenceException" line in the Console window, press Ctrl+C to copy it to the clipboard, and then paste it into a reply here. This will include the stack trace, which will provide more details.
-
- Posts: 30
- Joined: Sat Jan 19, 2019 2:14 pm
Re: EnviroSky plus Dialogue System: hard system crash
It's a pain to reproduce it now, as I finally got it fixed, but it must have to do with EnviroSky assuming it must render based on the MainCamera, which is suddenly "stolen" by the Dialogue System for camera sequences. Telling EnviroSky it must not look for the MainCamera during runtime, but attaching it to the actual player camera makes sure it doesn't get confused if said camera suddenly has no MainCamera tag anymore.
You're probably right when you say that this is an issue with EnviroSky assuming that the MainCamera tag is not suddenly stolen by other modules. Which, in itself, is a reasonable assumption
You're probably right when you say that this is an issue with EnviroSky assuming that the MainCamera tag is not suddenly stolen by other modules. Which, in itself, is a reasonable assumption
Re: EnviroSky plus Dialogue System: hard system crash
If the main camera (the one used by EnviroSky) is tagged MainCamera and you leave the Dialogue Manager's Camera & Cutscene Settings > Sequencer Camera unassigned, the Dialogue System will keep the main camera active during sequences. This should let EnviroSky happily continue running during conversations.
I haven't dug into EnviroSky's source. If you're using a separate sequencer camera, it might also work to tag it MainCamera as well. When the real main camera is deactivated and the sequencer camera becomes active, the C# script property Camera.main will point to the sequencer camera, so it will still be a valid value. EnviroSky will have to have been written to handle changes in main camera, though, so this might not work.
I'll also mention the Dialogue System Events component. You can add it to the Dialogue Manager and configure the OnConversationStart() and OnConversationEnd() to do things such as enable and disable components.
In any case, I'm glad you found a solution.
I haven't dug into EnviroSky's source. If you're using a separate sequencer camera, it might also work to tag it MainCamera as well. When the real main camera is deactivated and the sequencer camera becomes active, the C# script property Camera.main will point to the sequencer camera, so it will still be a valid value. EnviroSky will have to have been written to handle changes in main camera, though, so this might not work.
I'll also mention the Dialogue System Events component. You can add it to the Dialogue Manager and configure the OnConversationStart() and OnConversationEnd() to do things such as enable and disable components.
In any case, I'm glad you found a solution.