Forum rules - please read before posting.

How to intergrate AC with UCC?

13

Comments

  • edited July 2021

    Hello again, it seems like the UCC integration doesn't seem to work when the scene changes and cutscene is on start. It works correctly when starting the scene, but the problem arises when going from one scene to another.
    I've tried even putting
    if (KickStarter.stateHandler.gameState == GameState.Cutscene) { ultimateCharacterLocomotion.TryStartAbility(acMotionAbility); }
    On update, the ability is active, but the character is still able to move when on cutscenes.
    This doesn't seems to happen when there's no loading screen, but it happens when there's a loading screen (the loading screen only has a particle effect and text, no AC or UCC managers).
    I'm using Unity 2021.1.14f and AC 1.73.8
    Any ideas how to fix this ?
    Thank you.

  • edited July 2021

    Let's see the Cutscene you're running in OnStart. Does this issue occur if you start the game from this scene?

    What is your UCC version, and is your Player character a spawned prefab or a GameObject present in the scene file? If the former, try the latter.

  • edited July 2021

    No, the problem doesn't occur when starting from the scene, only happens when transitioning from other scene (using async loading and loadingscreen, if I don't use a loading screen it works ok).
    I'm using Third Person Controller v2.3.4 and the Player GameObject is present on both scenes.
    Weirdly enough it seems to work if I pause the cutscene and then unpause (using AC menu/pause).
    EDIT: This behavior seems to happen when I'm launching a timeline on the OnStartCutscene. The Timeline is set to Game Time (play on awake isn't ticked off), tried Unscaled GameTime but it's the same result.
    EDIT2: The problem exists even when not launching a timeline, just changing a cam and engine: wait is enough to reproduce the behavior.

  • I'll attempt a recreation and let you know if I need any more details.

  • Recreated, regardless of the loading scene presence. The fix may require an update to AC - I will keep you updated.

  • Thanks for the amazing support through the years man !

  • Here's a potential fix to test: open up AC's StateHandler.cs script and paste the following into its OnInitialiseScene function around line 939:

    previousUpdateState = gameState;
    

    Does that resolve it on your end?

  • Yes, it seems to be working now.
    Many thanks.

  • Hello everyone! I successfully integrated UCC with Adventure Creator during the weekend. It provides a near perfect solution for my side scroller type of game in terms of camera, but there's one thing I can't figure out. I'm using the Pseudo 3D (2,5D) camera & movement, and UCC provides a spline path system the player can follow. My game has intersections, so I need to figure out a way how I can switch the paths the player moves on with AC. Any idea how this could be achieved?

  • If you can share the code UCC requires, I can assist with converting it into an Action. Alternatively, if you have the code in a custom script function, you can trigger it via AC's Object: Send message / Object: Call event Actions.

  • Seems like the new version of UCC broke the integration:
    Assets\AdventureCreator\Downloads\UCC integration\Scripts\AC_Motion.cs(6,14): error CS0534: 'AC_Motion' does not implement inherited abstract member 'PathfindingMovement.Teleport(Vector3)'

  • Thanks, I'll check.

  • edited March 2022

    I've updated the package with a fix.

  • Hi @ChrisIceBox, thanks for enormous time and effort you've put into this awesome framework! Could we please get a "Third Person only" version? I'm getting errors with the UCC integration because it's lacking the first-person element, therefore being unable to run the UCC_integration 3rd&1st person demo scene.

  • edited March 2022

    Hi @Five. By version, do you mean demo scene? The integration itself should work with third-person. What is the exact error you're getting, as it appears in the Console window?

  • Apologies for the delayed reply, @ChrisIceBox ! Couldn't find out how to edit my previous comment!

    The AC_UCC_FirstAndThirdPerson scene incorporates the entire UCC version (obviously), however I only own the Opsive "Third Person" controller which doesn't have the "first person" aspect of the whole UCC package.

    So when I went to run the demo scene, Opsive throws errors at me because of it also having first person elements not present in the Third Person Controller scripts.

    The exact errors are the following:

    It did occur to me that it could be set up just for the third person controller, but I'm one of those people that learns from taking things apart so was curious to see if a dedicated "AC_UCC_ThirdPerson" scene could be made for the integration.

    As far as I can tell, the integration works fine, it's just I don't have the first person parts.

  • Thanks for the details.

    It's the UCC package I've been given to work with - the two demo scenes are essentially copies of the Demo scene that comes with UCC, reworked for AC using the same steps outlined in the integration's Readme file. It's because of this that you're getting the messages - since the Demo scene it's based off is not the same Demo scene that you'll have for the Third Person package. The errors being reported aren't related to AC.

    I can see about creating a copy of the ThirdAndFirstPerson scene that removes references (where possible) to First Person, but it may be cleaner for you to start with Opsive's Demo scene and rework it following the Readme's steps.

  • That's a kind offer - it may be useful as I'm not quite sure what the intended outcome is from what I've managed to achieve (or not, as it may be!!)

    I've setup a third person character and all the opsive stuff no problem. Tested privately and all works.

    I then removed the Nolan character that is causing all the errors and replaced Nolan with my own setup and working Third Person character.

    I've followed the readme and set up the scene as though it were the AC_UCC_ThirdAndFirstPerson scene, like for like.

    I've come across some interesting behaviour that I'm hoping you could share some light on:

    1. When the demo starts, the AC camera is situated behind the right dummy and doesn't move. This makes for a weird control for the character, which relies on the UCC camera to position the character. Is this intentional? Or should the AC camera behave like the UCC is supposed to?

    Here's a short imgur video demonstratng what happens:
    https://i.imgur.com/tnFjV5G.mp4

    This is what I expected to happen:
    https://i.imgur.com/tqJRa1e.mp4

    1. I've setup the items to be picked up properly (as seen in the video above), however the first time they are picked up, the items are not synced to AC. The second time I pick up an item, it is synced. Is this something I've done wrong with the items? I've assigned the ID to the item based on AC's inventory just like the demo - however the items are not on the character by default (unlike Nolan). This means they're not in the hierarchy of the player until the player walks over the pick up.

    Video (note, syncing on the second pickup): https://i.imgur.com/0YPT2cN.mp4

    1. I experience an odd camera lock where the player cannot rotate due to Opsive thinking I've pressed 'Escape', but pressing resume on the AC menu doesn't let Opsive know I've "tabbed back in" as it were, so the camera remains locked and despite moving the mouse left and right, the character cannot turn anymore.

    I've tested this for both AC Main camera (most obvious when 'aiming', but cannot turn): https://i.imgur.com/4jO3CDJ.mp4

    and UCC main camera: https://i.imgur.com/qbcCgS2.mp4

    I hope the videos help. Just trying to understand how the integration is intended to be used. Apologies for the long posts!!

  • That's a kind offer - it may be useful as I'm not quite sure what the intended outcome is from what I've managed to achieve

    I have updated the integration package with a third-person-only scene.

    When the demo starts, the AC camera is situated behind the right dummy and doesn't move.

    There are two ways to hook up AC's camera system into UCC - see the Readme file's "AC camera control" section. The "robust" way, which allows for camera-switching and is what the example scenes rely use, is to attach AC's "Basic Camera" component to the UCC Camera so that AC's MainCamera can follow it.

    This is the same approach as outlined in the AC Manual's "Adding custom cameras" chapter.

    To make AC's MainCamera follow a camera by default, assign that camera in the Scene Manager's "Default Camera" field.

    I've setup the items to be picked up properly (as seen in the video above), however the first time they are picked up, the items are not synced to AC

    First off, try replacing the integration's AC_UCC_Item script with the following:

    https://pasteall.org/ACnb6

    If that doesn't resolve it, try the integration's example scenes - as I can't recreate the issue using them. If they work, try to compare differences between the pickups in the example scene vs yours.

    I experience an odd camera lock where the player cannot rotate due to Opsive thinking I've pressed 'Escape'

    This may be an Editor-only issue - is this occuring in builds as well?

    The camera locking due to the Escape key being pressed will be a behaviour of Opsive, however. Check that your Player character's "Unity Input" component (from Opsive) has "Enable Cursor With Escape" unchecked.

    Just trying to understand how the integration is intended to be used.

    To provide some context: as the variety of possible games possible with both assets is so broad, the integration aims to provide a "base level" bridge between the two, so that developers can build upon it with the specific needs of their projects.

    While the integration and example scenes are intended to work without issue, I would expect further scripting work to be necessary in a proper production.

  • Thanks, tested out and although I get a few first person errors regarding the weapons, I can see how its supposed to function. I cannot recreate the pickup problem with your new scene so I suspect it was me!

    Thanks again for the support, really useful and I very much look forward to using this integration!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.