I've updated my project to the latest AC, but get these two compiler errors preventing me from running the game:
Assets\Scripts\PopulateWithScenes.cs(37,36): error CS7036: There is no argument given that corresponds to the required formal parameter '_filename' of 'SceneInfo.SceneInfo(int, string)'
Assets\Scripts\PopulateWithScenes.cs(38,43): error CS1503: Argument 1: cannot convert from 'AC.SceneInfo' to 'int'
Any idea what I should look for?
EDIT: Huh, I see that the AC top menu has disappeared from my project after I did an import. I think the project could have been corrupted somehow, got a "The associated script cannot be loaded" on every script in the project... Ouch! I did an import from the Asset store just like the other times I've upgraded. Good to have version control
EDIT 2: It seems it's the same issue as this post:
https://adventurecreator.org/forum/discussion/8425/anyone-else-have-trouble-loading-ac-with-newest-unity
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
If you reload Unity while a script compilation error exists, it will prevent custom toolbars, such as ACs, from loading.
See the update's Changelog - the SceneInfo class is now used internally only, with scene functions now accepting the build index number as a parameter.
To convert a scene name to its build index number, use:
If you need help with updating your script, I would have to see the code.
Ah, in my brain dead state I figured PopulateWithScenes was an AC script, not something I'd concocted myself
That's a script I added to a debug menu to quickly jump to any scene in the project for debug/playtesting purposes:
Replace that last function with this:
Thank you! Just a minor error, I had to change the change.value to change.name to get it to work. Here is the complete script if anyone wants to add a dropdown menu with all the scenes of your game to quickly go from one scene to another. (Note, you might have to add some more logic to remove the menu your dropdown component is inside, or some other housekeeping):