Hi
I recently updated AC to 1.71.4, but now I am getting compile errors with a script that I use that integrates with Adventure Creator player characters.
The Opsive TPC Adventure Creator Controller Bridge script produces these errors.
Assets/Third Person Controller/Integrations/Adventure Creator/AdventureCreatorControllerBridge.cs(86,70): error CS0122: AC.Char.CanBeDirectControlled() is inaccessible due to its protection level
and
Assets/Third Person Controller/Integrations/Adventure Creator/AdventureCreatorControllerBridge.cs(76,73): error CS1540: Cannot access protected member AC.Char.CanBeDirectControlled() via a qualifier of type AC.Char. The qualifier must be of type Opsive.ThirdPersonController.ThirdParty.AdventureCreator.AdventureCreatorControllerBridge' or derived from it
I am thinking it has something to do with the private variables, but I might be wrong here. Tried to change to public, same errors.
Unity 2018.4.4f1
AC 1.71.4
Thanks
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
This is the UCC integration script from the wiki?
AC's UCC integration has been updated to a dedicated package - grab it from the Downloads page.
Thanks for the link but the script I am having trouble is for the old version of TPC ( version 1.3.11 that is deprecated) the one before they upgraded to UCC. I never upgraded TPC to UCC because I have too many custom abilities that would not work with the new version.
Will this package still work ?
That'd be a question for Opsive, but I'd imagine it'd need some tweaking.
The original script issues you're posting, though, should be solvable by making the CanBeDirectControlled function (in both Player.cs and Char.cs) public. If there's still a compilation error, it should be different.
I'm not sure where your script is coming from, but if you'd like to post it I can take a look and see what else might be wrong.
Thanks Chris. Here's the original
The approach this takes isn't ideal, because it works by disabling AC's Player component.
I've made a couple of tweaks but I'm without the same asset so it may need a little more tweaking:
I'd still recommend contacting Opsive to ask about compatibility with the new integration, though - they were involved in producing it as well.
Thanks, I can work with this. Looks more tidy. I'll change CanBeDirectControlled functions in Char and Player to public first, and see what happens. Thanks again