Forum rules - please read before posting.

UCC player not detected and can't send message to a UCC Player

I'm on the current release 1.73.3 of AC and current UCC ver. The integration seems with some quirks. I have a UCC Player in a scene but since some scenes have different players I have the applicable UCC player in the scene of the UCC Camera can do an init as it won't use a prefab. And that is okay. The only issue is the UCC Player is not detected by triggers so I have to tell the trigger to use an object (The UCC player) so I have a work around. But I run into the same issue when I try to send an message to the player. It doesn't work if I send the message to player but does work if I send a message to the player object instead send to player. I don't use player switch in the OnStart as UCC's camera init fails. Just wondering if I might be missing a trick. The UCC player has the player tag, etc and works okay but I get the feeling it's not considered the active player as it was already in the scene. ie: I did not do a player switch due to UCC issues with that. Any thoughts?

Comments

  • I'm using an asset action list to send a custom object message. If I click in the action to send to player and either use the active player or select a player the message is not received. If I deselect the player and use the prefab for the player from the resource folder things work.

  • UCC requires that the Player be present in the scene file - you won't be able to rely on AC's Player-spawning feature.

    If I deselect the player and use the prefab for the player from the resource folder things work.

    This will cause the message to be sent to the prefab asset file itself - not the "live" instance of the Player in the scene - so it's probably not going to give the intended results.

    Does your UCC Player have an AC Player component? That should be enough for them to be considered the Player by AC.

    If you enable the 'AC Status\ box, via the bottom of the Settings Manager, that will display the current AC Player at runtime, provided it's gotten one. Is this listing the Player?

    The other way to do this would be to attach a Constant ID component to your prefab, check Retain in prefab?, and then reference this prefab in your Actions as you said you did. If the Player in the scene has a similar ID to the prefab, then the Actions should affect the scene instance, not the prefab.

  • The player has the AC Player component and it does display in the AC Status Box, but the the char is not showing as there is no player. If I change that player to be the default player in the settings it does show up as a player but then I get there is no look source as prefab can't be assigned to the UCC Camera. I can leave the character in the scene and send message to it as an object not as a player and same things works for detecting the character in triggers. Seems AC does not detect the UCC char as a player even though it has the AC Player script and is tagged as player. Strange quirk, but I think I can work around it by just referring to the char as an object. Not sure if there will be other issues, but I'll give that a shot.

  • edited March 2021

    The player has the AC Player component and it does display in the AC Status Box, but the the char is not showing as there is no player

    What exactly do you mean by "the char is not showing"? If you click on the Player's name displayed in the AC status box, it should ping the Player in the scene - is this the case?

    Is it possible you have multiple Player components present in the scene? AC should certainly be able to work with a "local" Player character in the scene file - spawning in via the Settings Manager is just a convenience. However, it may be considering the wrong GameObject to be the Player if there is more than one such component in the scene file.

  • There is no player name displayed in the AC Status box. Normally shows the current player. Never had issues before upgraded to UCC and current AC.
    Note this is not the default player and I do have delete the default player as first thing in OnStart otherwise I get problem with the UCC Camera.

    Did some checking on the SendMessage action list.
    If I select a player in the drop down the AssignValues method has the correct playerID number but the runtimeLinkedObject ends up being null.

    Note the following ends up with a null player;
    The playerID parm is 9.
    The playerParameterID is -1;
    Player player = AssignPlayer (playerID, parameters, playerParameterID);

    I was going to put a log in for the AssignPlayer but I can't seem to find what script that is in. If you can direct me to it I'll do that and I might be able to see why it fails.

  • edited March 2021

    Are you making use of AC's Player-switching feature? This is not compatible with local Players in the scene file - see the Manual's "Player switching" chapter. AC needs to be able to control exactly where each of the Players are, and which one is active, in order for it to work.

    What are your exact needs, so far as player management goes? If you need to make use of Player-switching, you'll have to rely on spawned Players - and get UCC to work with them - or disable Player-switching and rely on local Player objects only.

    AC's KickStarter.player property can be assigned to through custom script, which may be the way forward if you need to keep your Player in the scene but still be able to change the active Player - in the same scene - at runtime.

  • I have multiple players so I assumed I needed player switching although I do not need to switch in a scene. So sounds like local players will work for me. Thanks for taking the time to pointing that out. Great support!

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.